I have a trained CRNN
model which is supposed to recognise text from images.
It really works and so far so good.
My output is a CTC loss layer and I decode it with the tensorflow function keras.backend.ctc_decode
which returns, as the documentations says (https://code.i-harness.com/en/docs/tensorflow~python/tf/keras/backend/ctc_decode), a Tuple
with the decoded result and a Tensor
with the log probability of the prediction.
By making some tests with the model, I get this results:
True value: test0, prediction: test0, log_p: 1.841524362564087
True value: test1, prediction: test1, log_p: 0.9661365151405334
True value: test2, prediction: test2, log_p: 1.0634151697158813
True value: test3, prediction: test3, log_p: 2.471940755844116
True value: test4, prediction: test4, log_p: 1.4866207838058472
True value: test5, prediction: test5, log_p: 0.7630811333656311
True value: test6, prediction: test6, log_p: 0.35642576217651367
True value: test7, prediction: test7, log_p: 1.5693446397781372
True value: test8, prediction: test8, log_p: 0.9700028896331787
True value: test9, prediction: test9, log_p: 1.4783780574798584
The prediction is always correct. However what I think it's the probability seems not to be what I expect. They looks like completely random numbers, even grater than 1 or 2! What am I doing wrong??