I was working for OCR model applied to word mnist dataset from Kaggle in colab. I was inspiring by the model from ocr captcha with LSTM and CTC layer authored by A_K_Nain in Keras examples hosted in the site :https://keras.io/examples/vision/captcha_ocr/
It was working for me. but now I have a lot of problems in codind and decoding characters to and from number. And I tried to compilate the model in the site of ocring captcha and I found same problems. Can anyone explain what is the problem and if there is anyway to fix the problem.
I think the problem is in the following code:
Mapping characters to integers
char_to_num = layers.experimental.preprocessing.StringLookup(
vocabulary=list(characters), num_oov_indices=0, mask_token=None
)
Mapping integers back to original characters
num_to_char = layers.experimental.preprocessing.StringLookup(
vocabulary=char_to_num.get_vocabulary(), mask_token=None, invert=True
)
which maybe present some problems in his function.