[X] I've confirmed that my Keras model works outside of Talos.
Just a quick note for a possible error in your documentation/examples.
Of the four examples you list (Simple, Concise, Comprehensive, Field Report), only the Concise example makes use of the _hiddenlayers search parameter. However, while it is defined in the parameter dictionary ('hidden_layers':[0, 1, 2]) , the hidden_layers(model, params, 1) call is never made during model creation. I expect that the Concise example is defaulting to a single hidden layer in this example, and the code should be updated to:
from talos.model import hidden_layers # Needed for fix below
def breast_cancer_model(x_train, y_train, x_val, y_val, params):
model = Sequential()
model.add(Dense(params['first_neuron'], input_dim=x_train.shape[1],
activation=params['activation'],
kernel_initializer=params['kernel_initializer']))
model.add(Dropout(params['dropout']))
hidden_layers(model, params, 1) # Fix to add call to hidden_layers()
model.add(Dense(1, activation=params['last_activation'],
kernel_initializer=params['kernel_initializer']))
model.compile(loss=params['losses'],
optimizer=params['optimizer'](),
metrics=['acc', fmeasure_acc])
history = model.fit(x_train, y_train,
validation_data=[x_val, y_val],
batch_size=params['batch_size'],
callbacks=[live()],
epochs=params['epochs'],
verbose=0)
return history, model
Just a quick note for a possible error in your documentation/examples.
Of the four examples you list (Simple, Concise, Comprehensive, Field Report), only the Concise example makes use of the _hiddenlayers search parameter. However, while it is defined in the parameter dictionary (
'hidden_layers':[0, 1, 2]
) , thehidden_layers(model, params, 1)
call is never made during model creation. I expect that the Concise example is defaulting to a single hidden layer in this example, and the code should be updated to:Please correct me if I am wrong :)