facebookresearch / gtn_applications

Applications using the GTN library and code to reproduce experiments in "Differentiable Weighted Finite-State Transducers"
MIT License
80 stars 7 forks source link

Is it possible to get multiple recognition results instead of one? #11

Closed zhwa closed 3 years ago

zhwa commented 3 years ago

It seems that in model.viterbi(self, outputs), only one recognition results will be returned for each sample. Is it possible to return multiple alternates from this decoding method, like beam search? If yes, what would be the recommended decoding algorithm? Will that be time consuming?

Thanks!

vineelpratap commented 3 years ago

Hi, We currently don't support multiple hypothesis at the moment. Here is the code pointer for viterbi - https://github.com/facebookresearch/gtn/blob/master/gtn/functions/shortest.cpp#L190 if you want to hack things to support...