0

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 = hp.Int('units1', min_value=18, max_value=512, step=18)
hp_units2 = hp.Int('units2', min_value=15, max_value=512, step=5)
hp_units3 = hp.Int('units3', min_value=10, max_value=512, step=5)
model.add(Dense(units=hp_units1, input_dim=18, activation=hp.Choice('act1', values ['relu','sigmoid','tanh'])))
model.add(tf.keras.layers.Dense(units=hp_units2, activation=hp.Choice('act2', values=['relu','sigmoid','tanh'])))
'model.add(tf.keras.layers.Dense(units=hp_units3, activation=hp.Choice('act3', values=['sigmoid','relu','tanh'])))
model.add(Dense(5, activation='softmax'))
hp_learning_rate_seq = hp.Choice('learning_rate', values=[1e-2, 1e-3, 1e-4])
optimizer_seq = Adam(learning_rate=hp_learning_rate_seq)
model.compile(optimizer=optimizer_seq, loss='categorical_crossentropy', metrics=['accuracy'])
return model

import keras_tuner as kt
tuner = kt.Hyperband( build_model, objective='accuracy', max_epochs=30, hyperband_iterations=3, seed=100)

Thank you

1 Answers1

0

I think you should add the parameters to kt.Hyperband:

directory = 'your_directory',
project_name = 'your_project_name'

J R
  • 436
  • 3
  • 7