Questions tagged [keras-tuner]
166 questions
0
votes
1 answer
Kerastuner search doesn't get restarted even with Overwrite flag set to true
Tuning is done as follows:
tuner = kt.RandomSearch(
MyHyperModel(),
objective="mae",
max_trials=30,
overwrite=True,
directory=results_dir,
project_name="tune_hypermodel",
)
And I'm iterating over how many features to…

Caterina
- 775
- 9
- 26
0
votes
0 answers
How can you see and save the results (best hyperparameters) of Hyperparameter tuning with KerasTuner
So far I've only seen model.summary() or
best_hps=tuner.get_best_hyperparameters(num_trials=1)[0]
best_hps.get('num_layers')
best_hps.get('units_1')
best_hps.get('units_2')
best_hps.get('activation_1')
best_hps.get('activation_2')
Is there a way to…

Caterina
- 775
- 9
- 26
0
votes
1 answer
Keras_tuner TypeError('Inputs to a layer should be tensors... )
I was able to finally get the below code, up to the keras_tuner, I mention this as I'm not exactly sure I'm even working out the class structure correctly. I'm doing all of this so as to try put in my own values for "input_size" and "output_size"…

Relative0
- 1,567
- 4
- 17
- 23
0
votes
0 answers
Model is stuck at 0.51-0.52 accuracy and not improving
This is for a kaggle competition wherein I have essays which I have to grade/predict on 6 parameters (vocabulary, cohesion, conventions, grammar, phraseology, syntax).
I have implemented RandomSearch hypermodel to get better results but the model is…
0
votes
0 answers
y argument is not supported when using dataset as input - kerastuner Batchdataset tensorflow
is kerastuner and Batchdataset is compatible ?
Hi All I am trying to add batch dataset combine kerastuner bayesianoptimization and tensorflow ?
X is
0
votes
0 answers
Kerastuner objective warmup
I am tuning the parameters of a regression model on an objective that can have very small values at the beginning of training. It measures the smoothness of the regression function, s.t., when the initial guess is a straight line, the…

kingusiu
- 316
- 2
- 15
0
votes
0 answers
How to implement KerasTuner kt.HyperModel in subclass
I am tring to use the HyperModel Class from KerasTuner as a superclass.
I am using KerasTuner==1.1.3 and Keras==2.9.0
class ModelBuilder(keras_tuner.HyperModel):
def declare_hyperparameters(self, hp):
pass
def build(self, hp):
…

NameVergessen
- 598
- 8
- 26
0
votes
1 answer
how do you see the results for each trial execution using keras tuner?
I am trying to use keras tuner hyperband to select hyperparameters for my autoencoder model. Here's some pseudo code:
class AEHyperModel(kt.HyperModel):
def __init_(self, input_shape):
self.input_shape = input_shape
def build(self,…

YoungResearcher
- 91
- 1
- 3
0
votes
0 answers
KerasTuner: best step is always 0?
The plot from my keras tuner shows that the 'best step' is always zero. Does this mean that the first iteration of each trial was the best (lowest MSE) or am I misunderstanding?
Keras tuner plot picture
Many thanks

DrAI
- 1
0
votes
0 answers
Neural network written with keras outputs only 0
my neural network written in keras, for the problem of binary image classification, after selecting hyperparameters using the keras tuner, produces only zeros.
import keras_tuner
from kerastuner import BayesianOptimization
from keras_tuner import…

Eduard Ganzha
- 17
- 5
0
votes
0 answers
AttributeError: 'tuple' object has no attribute 'shape' using tuner.search()
I was trying to solve this problem
ValueError: `logits` and `labels` must have the same shape, received ((None, 1) vs (None, 2)). when trying to run this code:
tuner.search(x_train, y_train, batch_size=50,
validation_data = (x_test,…

Santiago A
- 7
- 1
- 5
0
votes
0 answers
Error generated during hyperparameter tuning
My trainX is (3350, 1, 8) and my TrainY is (3350, 2). I am getting some errors, but I don't understand what's the problem. I am getting this error when tuning the hyperparameters using the LSTM layer.
Output exceeds the size limit. Open the full…

Veeresh
- 1
0
votes
1 answer
Keras Hyper tuning - Final model state
I am new to Deep learning and would like to understand on the below points. Can you please help.
If I give number of epochs as 100 to train and try to evaluate the model, does it take the best epoch model or the final model after 100 epochs.
In…

Jegatheesan
- 105
- 2
- 8
0
votes
0 answers
Parameter adjustment using kerastuneR packet deep neural network
What is the cause of the following code error?
library(magrittr)
x_data <- matrix(data = runif(500,0,1),nrow = 50,ncol = 5)
y_data <- ifelse(runif(50,0,1) > 0.6, 1L,0L) %>% as.matrix()
x_data2 <- matrix(data = runif(500,0,1),nrow = 50,ncol =…

TUSTLGC
- 107
- 7
0
votes
1 answer
Keras tuner Bayesian Optmization graph error
I am trying to optimize a convolutional neural network with Bayesian Optimization algorithm provided in keras tuner library.
When I perform the line: tuner_cnn.search(datagen.flow(X_trainRusReshaped,Y_trainRusHot), epochs=50, batch_size=256)
I…

user979974
- 883
- 3
- 13
- 32