Created
March 2, 2019 09:42
-
-
Save farizrahman4u/70dc8b7412af17da86541de2628a2317 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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