Skip to content

Instantly share code, notes, and snippets.

@Akaame
Last active February 4, 2018 07:16
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 Akaame/f99ff7ec75547eb9c322eab3fcda66c2 to your computer and use it in GitHub Desktop.
Save Akaame/f99ff7ec75547eb9c322eab3fcda66c2 to your computer and use it in GitHub Desktop.
from sklearn.model_selection import train_test_split
xtrain, xtest, ytrain, ytest = train_test_split(trainX,trainY,test_size=0.3,random_state=42, shuffle=True)
m = get_model((100, 1), 50)
m.compile(optimizer="sgd", loss="categorical_crossentropy", metrics=["accuracy"])
m.fit(xtrain, ytrain, batch_size=256, epochs=300, validation_data=(xtest, ytest))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment