Skip to content

Instantly share code, notes, and snippets.

@farizrahman4u
Created March 2, 2019 09: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 farizrahman4u/70dc8b7412af17da86541de2628a2317 to your computer and use it in GitHub Desktop.
Save farizrahman4u/70dc8b7412af17da86541de2628a2317 to your computer and use it in GitHub Desktop.
from utils import load_data
from model import get_model
print("Loading data...")
(x_train, y_train), (x_test, y_test) = load_data()
print("Data laoded.")
print(x_train.shape)
print(y_train.shape)
print(x_test.shape)
print(y_test.shape)
model = get_model()
batch_size = 128
epochs = 15
model.fit(x_train, y_train, epochs=epochs, batch_size=batch_size)
loss, acc = model.evaluate(x_test, y_test)
print("Test loss: ", loss)
print("Test accuracy: ", acc)
model.save('model.h5')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment