Skip to content
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

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

Open
jiayi-wei opened this issue Nov 1, 2017 · 1 comment

Comments

@jiayi-wei
Copy link

Could you give me any suggestion?

@airaria
Copy link
Owner

airaria commented Nov 2, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants