-
Notifications
You must be signed in to change notification settings - Fork 55
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 on numbers dataset ! #8
Comments
Did you try to run the regular IAM/RIMES experiment from scratch? |
Yes, I trained successfully the model on IAM from scratch |
I have the same problem after I changed the alphabet (only lowercase letters and digits). Everything worked fine on my own dataset, until I tried again with an adjusted alphabet. After the first epoch, the real and fake OCR loss become negative. Edit: After changing the alphabet back to the original one (alphabetEnglish), the negative losses disappeared again, so most likely the issue occurs when characters are encoded or decoded? @AhmedAl93 Have you found a solution to this problem? |
@kymillev No solution until now :/ |
Hi @kymillev and @AhmedAl93, The common cause I found when found these errors for myself was data quality, which caused the NaN loss.
try to filter the data and see if this solves the problem. |
One addition to @rlit points.... make sure your real images and fake images have similar size distribution. |
Hi @darraghdog |
An approximate equal distribution of number of characters, resized to same width per character, I found helps a lot. |
@darraghdog I found the real image padding the same size although has different num of characters . so I should make same number of characters in batch ? |
Hello,
Thank you for this amazing work, really useful for the DS community !
I have an issue when I try to train the model from scratch on images containing mainly digits (either dates "dd/mm/yy" or simple sequences from in ICDAR 2013 dataset) .
The problem is that, at some point, generator hinge loss becomes NAN (in ScrabbleGAN_baseModel.backward_G function), the reason behind this is the tensor "ones_img" in ScrabbleGAN_baseModel.get_current_visuals() becomes NAN in the first place.
Please, I want to know how to avoid this situation, thanks in advance for your help !
P.S. Here are some logs :
(loss_G and dis_fake value represent generator hinge loss and ones_img tensor respectively)
The text was updated successfully, but these errors were encountered: