Based on the documentation (https://docs.w3cub.com/tensorflow~python/tf/keras/backend/ctc_decode), the function tf.keras.backend.ctc_decode
is supposed to return a Tuple
. Its first field contains the best path (let's assume we use greedy search), whereas the second one contains its log probability
.
Is this probability actually the accuracy of the prediction?
If not how am I supposed to calculate it?
I've tried on some test images and this was my output:
True value: test0, prediction: test0, acc: 1.841524362564087
True value: test1, prediction: test1, acc: 0.9661365151405334
True value: test2, prediction: test2, acc: 1.0634151697158813
True value: test3, prediction: test3, acc: 2.471940755844116
True value: test4, prediction: test4, acc: 1.4866207838058472
True value: test5, prediction: test5, acc: 0.7630811333656311
True value: test6, prediction: test6, acc: 0.35642576217651367
True value: test7, prediction: test7, acc: 1.5693446397781372
True value: test8, prediction: test8, acc: 0.9700028896331787
True value: test9, prediction: test9, acc: 1.4783780574798584
During the training part, the final CTC loss was around 0.1 and 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??
Thank you in advance!
question from:
https://stackoverflow.com/questions/65640885/crnn-tf-keras-backend-ctc-decode-what-is-log-probability 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…