from keras.models import load_model
import numpy as np
from keras.utils import np_utils


def read_data(path):
	with open(path) as f :
		lines=f.readlines()[0:3]
	lines=[eval(line.strip()) for line in lines]
	X,Y=zip(*lines)
	X=np.array(X)
	X=1.0*X/256
	X=X.reshape(-1,28*28)
	Y=np.array(Y)
	Y=np_utils.to_categorical(Y,num_classes)
	return X,Y


num_classes=11
X,Y=read_data("test_data")
model = load_model('model')  
results=model.predict(X)

for result,y in zip(results,Y):
	print(result)
	print(y)




