Skip to content
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

Training ended after 3 epochs even though 5 epochs is given as parameter #10

Closed
kiran-surya opened this issue Aug 28, 2015 · 5 comments
Closed

Comments

@kiran-surya
Copy link

[ec2-user@ip-172-31-54-168 deepnl-master]$ time python bin/dl-ner.py ner.dnn -t ~/data/wiki_conll2.iob --vocab ~/data/vocab.txt --vectors ~/data/vectors.txt --caps --suffix --s
uffixes ~/data/suffix.lst --gazetteer ~/data/eng.list -e 5 --variant senna -l 0.0003 -w 5 -n 300 -v
Creating capitalization features...
Generated 5 feature vectors with 5 features each.
Loading suffix list...
Generated 457 feature vectors with 5 features each.
Following is the issue:

Loading gazetteers
Generated 3 feature vectors with 5 features each.
Generated 3 feature vectors with 5 features each.
Generated 3 feature vectors with 5 features each.
Generated 3 feature vectors with 5 features each.
Creating new network...
... with the following parameters:

    Input layer size: 400
    Hidden layer size: 300
    Output size: 17

Starting training with 286490 sentences
Training for up to 5 epochs
.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........
+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+........
.+.........+.........+.........+.........+.........+.........+.........+.........+.........+.......
....+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.......
3 epochs Examples: 20576589 Error: 0.193514 Accuracy: 0.953445 48600 corrections skipped
Saving trained model ...
... to ner.dnn

@kiran-surya
Copy link
Author

Hi @attardi

Is this expected behavior ?

@attardi
Copy link
Owner

attardi commented Aug 29, 2015

It is called early stopping: if there is no progress in an epoch, the train stops.
In your case you had 48600 corrections skipped, i.e. examples that where already correctly classified and were not used.

@attardi attardi closed this as completed Aug 29, 2015
@kiran-surya
Copy link
Author

Thank you. Is there any randomness involved while training. with same training data and same parameters, do we always get same model ? If not, how to get same model with rest remains the same ?

@attardi
Copy link
Owner

attardi commented Aug 29, 2015

If you use the same initial embeddings and the same training data, you always get the same model, since the network is initialized with random values with a fixed seed.
The seed is set in dl-ner.py. You can comment it out if you want to get different results in different runs.

On 29/ago/2015, at 11:26, kiran-surya notifications@github.com wrote:

Thank you. Is there any randomness involved while training. with same training data and same parameters, do we always get same model ? If not, how to get same model with rest remains the same ?


Reply to this email directly or view it on GitHub #10 (comment).

@kiran-surya
Copy link
Author

got it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants