bert icon indicating copy to clipboard operation
bert copied to clipboard

Bert pre-training loss convergence

Open abhi060698 opened this issue 7 years ago • 6 comments

i am trying to pretrain BERT on my own dataset. Even though the code shows that saving and restoring from checkpoints is occuring, my loss value tends to stagnate at around 7. I am not seeing any convergence at all. What can I do?

abhi060698 avatar Jul 03 '19 15:07 abhi060698

Looks like it turned out after all.

DarrenAbramson avatar Aug 01 '19 17:08 DarrenAbramson

i am trying to pretrain BERT on my own dataset. Even though the code shows that saving and restoring from checkpoints is occuring, my loss value tends to stagnate at around 7. I am not seeing any convergence at all. What can I do?

Did you solve this? If so what was the solution?

ekgren avatar Mar 31 '20 07:03 ekgren

I got the same problem. I try to set my batchsize to a lager number, like 64, It seems to be convergent

SongDrink avatar Oct 13 '20 02:10 SongDrink

I got the same problem too. The problem was, that one of our training dataset (scraped) had thousands of repeated lines, so the training stuck at a local optimum (around 8). Make sure you check for replicas in your dataset before you train.

roberthajdu92 avatar Nov 03 '20 15:11 roberthajdu92

I got the same problem too. The problem was, that one of our training dataset (scraped) had thousands of repeated lines, so the training stuck at a local optimum (around 8). Make sure you check for replicas in your dataset before you train.

I got the same problem, could you please tell me which file had the repeated lines?

wawltor avatar Nov 22 '20 04:11 wawltor

It's your custom dataset, where you have to look for repeated lines!

roberthajdu92 avatar Nov 22 '20 14:11 roberthajdu92