ierhon commited on
Commit
5fc0978
1 Parent(s): 59c9077

Faster training

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -67,7 +67,7 @@ def train(data: str, message: str):
67
 
68
  model.compile(loss="sparse_categorical_crossentropy", metrics=["accuracy",])
69
 
70
- model.fit(X, y, epochs=32, batch_size=8, workers=4, use_multiprocessing=True)
71
  model.save(f"cache/{data_hash}.keras")
72
  tokens = tokenizer.texts_to_sequences([message,])[0]
73
  prediction = model.predict(np.array([(list(tokens)+[0,]*inp_len)[:inp_len],]))[0]
 
67
 
68
  model.compile(loss="sparse_categorical_crossentropy", metrics=["accuracy",])
69
 
70
+ model.fit(X, y, epochs=16, batch_size=8, workers=4, use_multiprocessing=True)
71
  model.save(f"cache/{data_hash}.keras")
72
  tokens = tokenizer.texts_to_sequences([message,])[0]
73
  prediction = model.predict(np.array([(list(tokens)+[0,]*inp_len)[:inp_len],]))[0]