CRNN icon indicating copy to clipboard operation
CRNN copied to clipboard

The loss always be inf

Open Dinghow opened this issue 6 years ago • 11 comments

I trained with the data generated by your tool TextRecognitionDataGenerator. And trained with 100 iterations, the loss is always be inf, I'm wondering the reason, thx a lot.

Dinghow avatar Jan 21 '19 05:01 Dinghow

Hi, inf loss does happen from time to time but usually, it's either a random occurrence (so restarting the training will fix it) or a problem with the dataset.

How big is your dataset? Are you training for Chinese? If so, what is the length of your CHAR_VECTOR?

Thank you

Belval avatar Jan 22 '19 13:01 Belval

Thanks for your immediate reply. Tried to restart the training many times, without any improvement. BTW, the size of my training dataset is 8000 in english. I just added some punctuations like ,.;'" to the CHAR_VECTOR.

Dinghow avatar Jan 22 '19 13:01 Dinghow

Interesting, I'll do some testing from my side see if I can get a test case.

If you could compress your 8000 samples dataset and send it to me to ensure reproducibility I would be grateful.

You can drop the file here: https://nextcloud.belval.org/index.php/s/MQsQrK8egatQtLo

Belval avatar Jan 22 '19 13:01 Belval

Sure, I'm glad to do that, the size is 10001 actually. And my CHAR_VECTOR is CHAR_VECTOR = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-'.!?,\"" just reuse yours.

Dinghow avatar Jan 22 '19 13:01 Dinghow

Just a heads up to say that I was able to reproduce the issue. I'm quite busy at the moment but I'll try to troubleshoot it ASAP.

Thank you for bringing this to my attention.

Belval avatar Jan 29 '19 03:01 Belval

OK, thx for your attention, hope for your update.

Dinghow avatar Jan 29 '19 06:01 Dinghow

I face the same problem. Have you solved it?

daming98 avatar Mar 25 '19 09:03 daming98

My dataset is Chinese and the length of CHAR_VECTOR is 70000+, the long lengths can cause problems?

daming98 avatar Mar 25 '19 09:03 daming98

My dataset is Chinese and the length of CHAR_VECTOR is 70000+, the long lengths can cause problems?

sorry, my CHAR_VECTOR is 7000+.

The training process is too slow. How can I solve it? It trains five steps in four days.

daming98 avatar Mar 25 '19 10:03 daming98

I face the same problem. Have you solved it?

Not yet. I used this project without this problem https://github.com/wushilian/STN_CNN_LSTM_CTC_TensorFlow/blob/master/utils.py

Dinghow avatar Mar 25 '19 14:03 Dinghow

I face the same problem. Have you solved it?

Not yet. I used this project without this problem https://github.com/wushilian/STN_CNN_LSTM_CTC_TensorFlow/blob/master/utils.py

Thank you. I'll try.

daming98 avatar Mar 25 '19 14:03 daming98