Skip to content

Instantly share code, notes, and snippets.

@cigrainger
Created January 9, 2017 17:03
Show Gist options
  • Save cigrainger/e3ec94d16e420e0cdfbcfcee9e041d9b to your computer and use it in GitHub Desktop.
Save cigrainger/e3ec94d16e420e0cdfbcfcee9e041d9b to your computer and use it in GitHub Desktop.
model = Sequential()
model.add(Dense(5, input_shape = (10,)))
model.add(Dense(1))
model.add(Activation('sigmoid'))
model.compile(loss='binary_crossentropy',
optimizer= 'sgd',
metrics=['binary_accuracy', 'fmeasure', 'precision', 'recall'])
history = model.fit(X_train, Y_train,
nb_epoch=nb_epoch, batch_size=batch_size,
verbose=1, validation_split=0.1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment