Commit 48483b96 authored by W.D.R.P. Sandeepa's avatar W.D.R.P. Sandeepa

Merge branch 'it18218640' into 'master'

It18218640

See merge request !98
parents f4148788 6f13bc17
......@@ -109,11 +109,11 @@ def main():
checkpoint = ModelCheckpoint('models/model-{epoch:03d}.h5', monitor='val_loss', save_best_only=True, mode='auto')
# train the model
history = model.fit(X_train, y_train, epochs=EPOCHS, batch_size=BATCH_SIZE, validation_data=(X_validation, y_validation))
history = model.fit(X_train, y_train, epochs=EPOCHS, batch_size=BATCH_SIZE, validation_data=(X_validation, y_validation), callbacks=[checkpoint])
# evaluate the model
test_error, test_accuracy = model.evaluate(X_test, y_test)
print(f"Test error: {test_error}, test accuracy: {test_accuracy}")
# test_error, test_accuracy = model.evaluate(X_test, y_test)
# print(f"Test error: {test_error}, test accuracy: {test_accuracy}")
# save the model
model.save(SAVE_MODEL_PATH)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment