Viterbi decoder for top_k best paths

Hello team!.
I was wondering if there’s a similar function to the viterbi_decode but instead of returning the best path, it returns the top_k best paths.

I couldn’t find anything on the internet.

Let me know. Best.

No but I think that you can quite easily adapt this with the same TF ops:

/cc @XiaoquanKong

Thank you Bhack! This was the same implementation I found yesterday and actually did what you suggested, translating the Torch functions to Tensorflow.

As soon as I have the working code, I’ll post it here so anyone can use it in the future.

1 Like

You could try to propose it to keras-nlp if they are interested: