Questions tagged [keras-tuner]

166 questions
0
votes
0 answers

Keras-Tuner: Dependent hyperparameters

I have a simple use case, but I cannot find any solution to this problem anywhere: I have two hyperparameters which I want to tune with keras-tuner: Amount of nodes of the first hidden layer Amount of nodes of the second hidden layer Now, I want…
Code Pope
  • 5,075
  • 8
  • 26
  • 68
0
votes
1 answer

Tensorsflow keras tuner will run once but not again

my code will run only one time after that it will only display how many images found in each flow from directory. It run the tuner once and then won't run it again, maybe it thinks I have already ran the code and don'tt need to again. I think it has…
benjam
  • 1
0
votes
0 answers

Does keras tuner support ragged tensors?

Appologies if this has been covered elsewhere but after a few days of hunting I can't seem to find a suitable answer. I am working with ragged tensors comprising short sections of waveform data. I wanted to be able to utilize the keras tuner. From…
webber.96
  • 1
  • 1
0
votes
0 answers

Error when trying to save the checkpoints hyperband

I am running hyperparameter tunning using Hyperband and Keras_tunner, I have the following network : import tensorflow as tf from tensorflow import keras from tensorflow.keras.models import Sequential, Model from tensorflow.keras.layers import…
Stetco Oana
  • 101
  • 1
  • 1
  • 11
0
votes
0 answers

Keras_tuner AttributeError: 'Sequential' object has no attribute 'distribute_strategy'

I am trying keras tuner for the first time. Here is my code: import os import sys import pandas as pd import numpy as np import matplotlib.pyplot as plt import tensorflow import tensorflow.keras from tensorflow.keras.models import Sequential from…
0
votes
1 answer

Using keras tuner for hyperparameter tuning and extracting trial statistics with Tensorboard workaround

I'm using keras tuner for hyperparameter tuning my sequential neural network in keras. My aim is to let keras tuner do a lot of trials and then save all statistics - loss, hyperparameters, trial numbers and epochs - to a file, so I can plot them…
0
votes
0 answers

tensorflow.python.framework.errors_impl.FailedPreconditionError: keras_tuner/untitled_project/trial_1; Directory not empty

I am trying to use keras_tuner with cross-validation for hyperparameter optimization. My code looks as follows: for i in range(5): train_df = df[df['fold'] != i] valid_df = df[df['fold'] == i] . . …
0
votes
1 answer

KeyError: {objective} in Keras Tuner regression search

I am trying to use Keras Tuner to do hyperparameter tuning on a regression ANN. When I do a hyperparameter search, I receive KeyError: 'val_mean_absolute_error. Here is my code: def build_model(hp): model = keras.Sequential() for i in…
Tim
  • 1
  • 1
0
votes
0 answers

how to use percision as well as recall as objective in keras tuner

I am new to Tensorflow ,I donot know how to get objective set to at least 10% val_recall with maximum val_precision in keras tuner. can somebody please let me know what needs to be done for f1score as a metric in keras-tuner. Currently it is set to…
Granth
  • 325
  • 4
  • 17
0
votes
1 answer

Keras Tuner how to do basic grid search

Keras Tuner offers several tuning strategies in the form of tuner classes. I fail to find an implementation for the most basic tuning strategy, which is a grid search. Did I oversee it? If not, is there a way to force the strategy on one of the…
Viktor
  • 583
  • 1
  • 3
  • 10
0
votes
1 answer

Keras Tuner on autoencoder - Add condition : first hidden layer units greater than or equal next hidden layer units

I want to use Keras-tuner to tune an autoencoder hyperparameters. It is a symetric AE with two layers. I want the number of units in the first layer always greater than or equal the units in the second layer. But I don't know how implement it with…
Larel5000
  • 1
  • 2
0
votes
0 answers

kerastuner tune hyperparameter that selects a subset of input features

I have a toy problem, where I have some data (X,Y) where the labels Y are frequencies, and X are cosine functions with frequency Y: X=cos(Y*t+phi)+N, where t is a time vector, phi is some random phase shift and N is additive noise. I am developing a…
0
votes
1 answer

How can I extract all arguments I am passing to a TensorFlow function?

It is difficult to retrain my models in new data because I never remember my initial optimizer, loss function, and hyperparameters. How can I extract all arguments I am passing to a TensorFlow function? Let's say from the code below, how to extract…
0
votes
1 answer

Simple Tensor Flow Example with keras_tuner

I am new to Tensorflow and keras_tuner. I am working with PyCharm, Anaconda3, Python 3.9.12. Below you can find a minimal working example. The code trains in the first part a simple reference ANN with fixed hyperparameters, using one input and…
Zeit
  • 13
  • 5
0
votes
0 answers

ValueError: Tensor conversion requested dtype float64 for Tensor with dtype float32

Trying to use Keras Tuner to optimize my hyperparameters. I build the following model: def build_model(hp): model = Sequential(name='ESN_NE') model.add(InputLayer((timesteps, input_dim), name='input_layer')) …
Murilo
  • 533
  • 3
  • 15