Skip to content

Instantly share code, notes, and snippets.

@edwardleoni
Last active March 2, 2018 04:27
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 edwardleoni/f095499d5e530af93e37554cff2e8a10 to your computer and use it in GitHub Desktop.
Save edwardleoni/f095499d5e530af93e37554cff2e8a10 to your computer and use it in GitHub Desktop.
from keras.models import load_model
import numpy
dataset = numpy.loadtxt("wine-data.csv", delimiter=";")
input = dataset[:, 0:11]
output = dataset[:, 11]
# since the data comes in a scale of 0 to 10, this is needed to we get a simple true or false
output = [(round(each / 10)) for each in output]
model = load_model('wine-model.h5')
scores = model.evaluate(input, output)
print("\n%s: %.2f%%" % (model.metrics_names[1], scores[1]*100))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment