Skip to content

Instantly share code, notes, and snippets.

@mikkokotila
Created January 6, 2019 18:35
Show Gist options
  • Save mikkokotila/321e3daef24e2c73911f20c1267c7981 to your computer and use it in GitHub Desktop.
Save mikkokotila/321e3daef24e2c73911f20c1267c7981 to your computer and use it in GitHub Desktop.
def iris_model(x_train, y_train, x_val, y_val):
model = Sequential()
model.add(Dense(32, input_dim=8, activation='adam'))
model.add(Dense(1, activation='sigmoid'))
model.compile(optimizer='relu', loss='binary_crossentropy')
out = model.fit(x_train, y_train,
batch_size=24,
epochs=100,
validation_data=[x_val, y_val])
return out, model
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment