how to handle early stop

12 views
Skip to first unread message

Shantanu Nath

unread,
Jun 5, 2020, 1:52:58 AM6/5/20
to Nematus Support
Dear Senrich,

I have encountered a new problem after entering the following 
```
python nematus/train.py --model_type transformer --datasets orginal_data/old/trainEn.txt orginal_data/old/trainBn.txt --dictionaries orginal_data/old/corpus.en.tok-20000.bpe.json orginal_data/old/corpus.bn.tok-20000.bpe.json --valid_source_dataset orginal_data/old/trainDevEn.txt --valid_target_dataset orginal_data/old/trainDevBn.txt --dim_word 256 --dim 256 --n_words_src 30000 --n_words 30000 --maxlen 50 --optimizer adam --lrate 0.0001 --batch_size 32 --no_shuffle --dispFreq 500 --finish_after 200000
```
It successfully created model till 120000 iteration. unfortunately, it stopped at 150000 showing a message early stop.

But i want to train model 200000 or more. How can I overcome this situation?

Best regards,
Shantanu Nath

Rico Sennrich

unread,
Jun 5, 2020, 8:52:45 AM6/5/20
to nematus...@googlegroups.com
Hello Shantanu,

early stopping means that your last N (by default: 10) validation failed to improve upon the best model. If you want to train for longer, you can either increase "--patience" to a higher value, or do validation less often (by increasing "--valid_freq"). However, there's a good chance that the model after 200,000 iterations will be worse than the best one found via early stopping.

best wishes,
Rico
--
You received this message because you are subscribed to the Google Groups "Nematus Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nematus-suppo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nematus-support/2ac311f1-8892-4563-8fd5-4dc071b9dc91o%40googlegroups.com.


Reply all
Reply to author
Forward
0 new messages