def test(): model = Model("data.txt", max_size) model.load() checker = Checker() print(">", end='') while True: text = input() print("Input :", text) output = model.test(text) print("Output:", output) fixed = checker.correct(output[0]) print("Fixed :", fixed) print(">", end='')
def train(): with tf.device('/GPU:0'): model = Model("data.txt", max_size) model.load() model.train(50)