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

Why epochs is 5? #7

Closed
gongshaojie12 opened this issue Jul 30, 2021 · 9 comments
Closed

Why epochs is 5? #7

gongshaojie12 opened this issue Jul 30, 2021 · 9 comments

Comments

@gongshaojie12
Copy link

Hi,I noticed that the epochs is 5 during training, why not set it a bit larger? Is it because the epochs are set too large to cause overfitting? Thanks!

@finiteautomata
Copy link
Collaborator

finiteautomata commented Jul 30, 2021

@gongshaojie12 I just used a fairly standard number of epochs. I observed no increased performance by running them for a larger period of time.

You can try it to train them for more time and let me know if that yields better results. Ping me if you want to do so (particularly regarding downloading the data, I haven't documented that very much)

@gongshaojie12
Copy link
Author

Hi @finiteautomata I set epochs to 30, eval_loss and train_loss are as follows:

图片

As can be seen from the figure, from the third epoch, eval_loss starts to rise, while train_loss keeps falling. It shows that the model has been overfitting. What is the reason? I guess the reasons may be: 1, the data set is too small, 2, the pre-training model for fine-tuning is too large.

@finiteautomata
Copy link
Collaborator

@gongshaojie12 great, thanks for your experiments. I understand that you observed no performance increase by setting a larger number of epochs; moreover, it seems that ~5 epochs seems to be ok.

What dataset are you using? SemEval (English) or TASS(Spanish)?

@gongshaojie12
Copy link
Author

gongshaojie12 commented Aug 2, 2021

Hi @finiteautomata The dataset I used is EmoEvent(dataset_emotions_EN.csv). The training command is: python bin/train_emotion.py "roberta-base" models/roberta-base-emotion-analysis/ --epochs 5 --lang en . Is the dataset used incorrectly?

@finiteautomata
Copy link
Collaborator

@gongshaojie12 that is the dataset used for English Emotion Analysis. As you can see, that dataset is small-sized – the same occurs with the Spanish version of EmoEvent, and the Sentiment Analysis in Spanish (TASS). We used 10 epochs for Sentiment Analysis in English as that dataset is bigger (around 50k instances)

@gongshaojie12
Copy link
Author

Hi @finiteautomata Thanks for your reply. What if I want to get more EmoEvent data?

@finiteautomata
Copy link
Collaborator

@gongshaojie12 if you want to get more data, you should collect and annotate your own corpus. You can get more information on how the authors did so here https://github.com/fmplaza/EmoEvent-multilingual-corpus

@gongshaojie12
Copy link
Author

OK,Thanks a lot

@finiteautomata
Copy link
Collaborator

Closing this. Feel free to reopen or send email if you have any doubt

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