Skip to content

Instantly share code, notes, and snippets.

@ResidentMario
Last active March 14, 2019 22:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ResidentMario/7c3874e83f531da08f1ddab632c83114 to your computer and use it in GitHub Desktop.
Save ResidentMario/7c3874e83f531da08f1ddab632c83114 to your computer and use it in GitHub Desktop.
from keras.wrappers.scikit_learn import KerasClassifier
# notice how we go back to stating hyperparameters at init time
# this is the "scikit-learn" way
model = KerasClassifier(
twoLayerFeedForward, epochs=100, batch_size=500, verbose=0
)
# now fit and predict
model.fit(X, y)
y_pred = model.predict(X)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment