ierhon commited on
Commit
ef442b3
1 Parent(s): ec0ebad

Fix epochs not changing mistake

Browse files
Files changed (1) hide show
  1. chatbot_constructor.py +1 -1
chatbot_constructor.py CHANGED
@@ -99,7 +99,7 @@ def train(message: str = "", regularization: float = 0.0001, dropout: float = 0.
99
 
100
  model.compile(optimizer=RMSprop(learning_rate=learning_rate), loss="sparse_categorical_crossentropy", metrics=["accuracy",])
101
 
102
- model.fit(X, y, epochs=16, batch_size=8, workers=4, use_multiprocessing=True)
103
  model.save(f"cache/{data_hash}")
104
  tokens = tokenizer.texts_to_sequences([message,])[0]
105
  prediction = model.predict(np.array([(list(tokens)+[0,]*inp_len)[:inp_len],]))[0]
 
99
 
100
  model.compile(optimizer=RMSprop(learning_rate=learning_rate), loss="sparse_categorical_crossentropy", metrics=["accuracy",])
101
 
102
+ model.fit(X, y, epochs=epochs, batch_size=8, workers=4, use_multiprocessing=True)
103
  model.save(f"cache/{data_hash}")
104
  tokens = tokenizer.texts_to_sequences([message,])[0]
105
  prediction = model.predict(np.array([(list(tokens)+[0,]*inp_len)[:inp_len],]))[0]