Hey, I want to use beam search for inference in text recognition. I have understood the theory behind it but implementing it seems difficult. I looked at various codes but they all were difficult to understand. Can anyone guide to a simplified and well documented code of beam search. Or can anyone explain the code in this link.
This code seems pretty nice and usable, can you point out to the line where you’re not able to understand.
Check if this helps:
I didn’t understand the line no. 77. Can you elaborate what’s happening inside the
logsumexp() is nothing but taking the softmax for the arguments passed to it.
What is the need of softmax? Shouldn’t we just add the log probabilities.
For eg. in line no. 77 instead of
logsumexp() can we write
n_p_b = p_b + p
logsumexp() doesn’t look like a softmax function.