-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lstm_train_embedded stops after X epochs #11
Comments
Just tried again and it ended after 6 epochs. |
Running with Epoch 13/100
123/123 [==============================] - 19s 153ms/step - loss: 3.2521 - acc: 0.2736 - val_loss: 5.9371 - val_acc: 0.0312
Epoch 14/100
123/123 [==============================] - 20s 163ms/step - loss: 3.0039 - acc: 0.3107 - val_loss: 6.0639 - val_acc: 0.0521
>>> dir()
['Activation', 'BATCH_SIZE', 'Bidirectional', 'Dense', 'Dropout', 'EarlyStopping', 'LSTM', 'LambdaCallback', 'MIN_WORD_FREQUENCY', 'ModelCheckpoint', 'SEQUENCE_LEN', 'STEP', 'Sequential', '__builtins__', '__cached__', '__doc__', '__loader__', '__name__', '__package__', '__spec__', 'callbacks_list', 'checkpoint', 'corpus', 'early_stopping', 'examples', 'examples_file', 'f', 'file_path', 'generator', 'get_model', 'i', 'ignored', 'ignored_words', 'indices_word', 'io', 'k', 'model', 'next_words', 'next_words_test', 'np', 'on_epoch_end', 'os', 'print_callback', 'print_function', 'sample', 'sentences', 'sentences_test', 'shuffle_and_split_training_set', 'sys', 'text', 'text_in_words', 'v', 'word', 'word_freq', 'word_indices', 'words'] |
It is possibly caused by the EarlyStopping https://keras.io/callbacks/#earlystopping. Try to run it commenting the line early_stopping = EarlyStopping(monitor='val_acc', patience=20) And removing it from the callbacks callbacks_list = [checkpoint, print_callback, early_stopping] |
That seems to have let things progress further, but I'm still running into the same Unicode errors that I have with other RNN type examples. Every source in my project is produced with
|
Try to create example_files with import codecs The modify examples_file = open(examples, "w") For examples_file = codecs.open(examples, 'w', encoding='utf8') And leave the rest as is. |
Following the examples in the readme but using my own input set results in the script just..ending after 24 completed epochs. No output or errors.
The first time I ran the script I had encoding issues, now it's just ending.
The text was updated successfully, but these errors were encountered: