crnn-pytorch
crnn-pytorch copied to clipboard
Incorrect number of classes
Hey thanks for sharing the code, but I found a possible issue while training the network. While editing the number of characters in the alphabet.py
file, I followed the guide and replaced the Chinese characters by English one and my network trained fine. But while reading the code and debugging I found that the nClass
output dimension of the CRNN was 72
while the number of unique characters in the alphabet.py
class was only 36. I eventually realized that that code is splitting the characters wrongly and considering \n
newline as a character as well that's why the output dimension was [26x1x72]
instead of [26x1x37]
this can cause an issue in training. I can raise a PR fixing this if you want. Thanks.
Of course you can. Thank you~
Hello, how can I solve this problem!
@livekeys just edit the alphabet.py to have all the characters in the same line this way \n
will not be treated as a new character.
Thank you very much!