Skip to content

Instantly share code, notes, and snippets.

@Akaame Akaame/ecs50_training.py
Last active Feb 4, 2018

Embed
What would you like to do?
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
You can’t perform that action at this time.