I just copy pasted the example from the code like this:
from numpy import loadtxt
dataset = loadtxt("https://raw.githubusercontent.com/jbrownlee/Datasets/master/pima-indians-diabetes.data.csv", delimiter=",")
x = dataset[:,0:8]
y = dataset[:,8]
from keras.models import Sequential
from keras.layers import Dense
def diabetes():
model = Sequential()
model.add(Dense(12, input_dim=8, activation='relu'))
model.add(Dense(8, activation='relu'))
model.add(Dense(1, activation='sigmoid'))
model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])
model.fit(X, Y, epochs=100, batch_size=10, verbose=0)
return model
from keras.activations import relu, elu
p = {
'first_neuron': [12, 24, 48],
'activation': [relu, elu],
'batch_size': [10, 20, 30]
}
# add input parameters to the function
def diabetes(x_train, y_train, x_val, y_val, params):
# replace the hyperparameter inputs with references to params dictionary
model = Sequential()
model.add(Dense(params['first_neuron'], input_dim=8, activation=params['activation']))
#model.add(Dense(8, activation=params['activation']))
model.add(Dense(1, activation='sigmoid'))
model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])
# make sure history object is returned by model.fit()
out = model.fit(x, y,
epochs=100,
batch_size=params['batch_size'],
#validation_split=.3,
verbose=0)
# modify the output model
return out, model
import talos as ta
t = ta.Scan(x, y, p, diabetes)
and I keep receiving the follosing error:
Traceback (most recent call last):
File "", line 51, in
import talos as ta
File "/Users/mattiavicari/anaconda3/envs/Optimize_DL/lib/python3.7/site-packages/talos/init.py", line 30, in
del commands, scan, model, metrics, key
NameError: name 'commands' is not defined
Is there any fix available?
Note that I have installed talos with the updated github version.
Thanks so much in advance!
I just copy pasted the example from the code like this:
and I keep receiving the follosing error:
Is there any fix available? Note that I have installed talos with the updated github version. Thanks so much in advance!