Questions tagged [keras-tuner]

166 questions
0
votes
1 answer

Error regarding "accuracy" in hyper-parameter tuning using Keras-tuner

My original MLP model is as follows: def create_model(n_hidden_1, n_hidden_2, num_classes, num_features): # create the model model = Sequential() model.add(tf.keras.layers.InputLayer(input_shape=(num_features,))) …
user366312
  • 16,949
  • 65
  • 235
  • 452
0
votes
1 answer

How can I pass arguments into the tuner-model?

The following is my original MLP model: def create_model(n_hidden_1, n_hidden_2, num_classes, num_features): # create the model model = Sequential() model.add(tf.keras.layers.InputLayer(input_shape=(num_features,))) …
user366312
  • 16,949
  • 65
  • 235
  • 452
0
votes
0 answers

Keras tuner error: logits and labels must have the same first dimension

I'm working on my own dataset and trying to fine-tune the parameters using the Keras tuner.I'm using the basic model-building function: from tensorflow.keras import layers from keras_tuner import RandomSearch def build_model(hp): model =…
user1506515
  • 11
  • 1
  • 3
0
votes
1 answer

Tensor's shape is not compatible with supplied shape, Error in Keras Tuner

I am using Keras tuner. For the simple following code: import keras_tuner as kt from tensorflow.keras.regularizers import l1, l2 from tensorflow.keras.models import Sequential # x: 100 x 20 # y: 1 x 100 tuner = kt.Hyperband( …
OmG
  • 18,337
  • 10
  • 57
  • 90
0
votes
1 answer

Using Random search in keras_tuner

When I run RandomSearch.search I got error message that logits shape and labels shape are different. I Don't understand what is the error. Any help? following the error message: tensorflow.python.framework.errors_impl.InvalidArgumentError: …
0
votes
1 answer

Installing keras_tuner in a TensorFlow 2.5 environment

I'm trying to use keras_tuner.RandomSearch to find the best parameters that fit my model. I installed keras_tuner in my anaconda command prompt using the following command: conda install -c conda-forge keras-tuner I then imported the package as…
0
votes
1 answer

Kerastuner for LSTM

I am working on a text classification problem and trying to use Kerastuner to identify the best configuration for my LSTM network. Below is the code for same: keras Tuner def build_model(hp): num_hidden_layers =1 num_units = 8 dropout_rate…
0
votes
0 answers

Not getting same evaluation scores as my NN design when I gave the same parameters into Hyperband

I have an issue with hyperparameter optimization. I designed a simple NN and I am performing Hyperband class for hyperparameter optimization. Before executing the hyperparameter search, I want to see that if I give Hyperband model the same…
0
votes
1 answer

Keras tuner.search search error is giving me an error related to shapes `Shapes (None, 11, 11) and (None, 1000, 11) are incompatible`

I am developing an LSTM model for multi-label text classification with 11 categories. The keras.tuner gives me an error while the model without tunning runs well. I would really appreciate if someone can point out the issue behind these errors. I…
0
votes
1 answer

Model summary is empty

I am trying to build a neural network using keras functional API and to train the network I am using keras tuner. The model consists of some embedding layers and then some dense layers: import pandas as pd import numpy as np from keras.models import…
0
votes
0 answers

Custom loss with external parameters in Keras Tuner

While my code runs without any problems with Keras Tuner and standard loss functions like 'mse' I am trying to figure out how to write a custom loss function that accept an external argument in addition to true and forecasted y to use inside Keras…
0
votes
1 answer

LSTM - RuntimeError: Too many failed attempts to build model

I am trying to use keras tuner to tune an LSTM neural network to detect if an article is a fake news or not, using a kaggle dataset. However, I keep getting this error: RuntimeError: Too many failed attempts to build model I have also tried to use…
0
votes
1 answer

Hyperparameter optimization of transfer learning model with Keras Tuner

I want to perform hyperparameter optimization on my transfer learning model using Keras Tuner. I am not sure how to do this since I have two stages of training, freezing the whole network and only train the last layer to converge to the new classes…
masie
  • 1
  • 1
0
votes
1 answer

How can I get a stateful LSTM to reset its states between epochs during a Keras Tuner search?

I am trying to tune a stateful LSTM using Keras Tuner. I have the code working and it is able to train models, but I still can't figure out how to get the model to reset states between epochs. Normally I would train for 1 epoch at a time in a loop…
WVJoe
  • 515
  • 7
  • 21
0
votes
1 answer

InvalidArgumentError: logits and labels must have the same first dimension, got logits shape [1,10] and labels shape [40]

I'm using Keras-Tuner to auto-identify the best parameters for my CNN. I am using Celeb_a dataset. you can find the code I am using here When I try to run it I get the error below. InvalidArgumentError: logits and labels must have the same…
Jean Camargo
  • 340
  • 3
  • 17
1 2 3
10
11