CaptchaRecognition
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.
Could you give me any suggestion?
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.