CaptchaRecognition icon indicating copy to clipboard operation
CaptchaRecognition copied to clipboard

When using your project with just a few modification in my lisence plate recognition work, the CTC loss always gave nan.

Open jiayi-wei opened this issue 8 years ago • 1 comments

Could you give me any suggestion?

jiayi-wei avatar Nov 01 '17 09:11 jiayi-wei

If you are using your own data, you may check if the value of x is in the right range [-1,1] ? and if y starts with a SOS symbol(for example, '^'), ends with a EOS symbol('$') and paddings (' ') ? The value of SOS symbol in the dictionary (vocab['token2id']) should be 0 ( i.e. , vocab['token2id']['^']=0), and besides, vocab['token2id']['$']= len(vocab['token2id'])-1, vocab['token2id'][' ']=len(vocab['token2id'])-2

If your data is OK, I suggest you to follow and print the variables step by step, and check the values of the variables to see if any anomalies happen before the CTC loss.

airaria avatar Nov 02 '17 12:11 airaria