Ejemplo n.º 1
0
import numpy as np
from tfHelper import tfHelper
import data

tfHelper.log_level_decrease()
# tfHelper.numpy_show_entire_array(28)
# np.set_printoptions(linewidth=200)


print ("Load data ...")
_, X_id, label = data.load_data_predict()

X_pred = tfHelper.get_dataset_with_one_folder('classed/.None', 'L')
X_pred = data.normalize(X_pred)

model = tfHelper.load_model("model_img")
# model = tfHelper.load_model("model")

######################### Predict #########################
predictions = model.predict(X_pred)

# print(predictions)
# exit (0)


# All features
with open("output_img_detailed", "w+") as file:
	# Head
	for line in label[:-1]:
		file.write(line + ",")
	else:
Ejemplo n.º 2
0
from Test import Test
from Train import Train
from tfHelper import tfHelper

import model

import os

te = Test()
tr = Train()

if os.path.exists("model.h5"):
    model = tfHelper.load_model("model")
else:
    model = model.model()

while True:
    te.test(model)
    model = tr.train(model)