1

I am trying to use hyperas for a regression problem. Most of the examples I saw are on classification problems only and I tried to build my model optimization accordingly. However, I am getting an Invalid Loss everytime I try to optimize my model.

model.compile(loss = 'mean_squared_error', optimizer='adam', metrics=['mse'])
model.fit(X_train, y_train, batch_size=64, epochs=20, verbose=0, shuffle = True, validation_data=(X_test, y_test))
val_loss = model.evaluate(X_test, y_test, verbose = 0)
return {'loss': val_loss, 'status': STATUS_OK, 'model': model}

I am optimizing my model with

best_run, bestmodel = optim.minimize(model = create_model, data=data, algo = tpe.suggest, max_evals= 10, trials = Trials(), notebook_name= 'Untitled' )

Can anyone help me with this? I am new to hyperas and don't know where am i going wrong in the regression problem?

Also is there any other hyperparameter optimizer which is easier to use ?

codeblaze
  • 73
  • 8

0 Answers0