tensorflow-onnx icon indicating copy to clipboard operation
tensorflow-onnx copied to clipboard

Support CTCBeamSearchDecoder

Open CaptainDario opened this issue 1 year ago • 2 comments

New Operator

Describe the operator

Basic BeamSearch decoder as described here

Do you know this operator be constructed using existing ONNX operators?

I think so but I am not sure

Is this operator used by any model currently? Which one?

Many models use beam search for decoding the bare output such as CRNN.

Are you willing to contribute it? (Y/N)

N

Notes

I am trying to convert a CRNN model from TensorFlow that uses beam search. I am fairly new to ONNX and I am getting this error when trying to convert it.

Tensorflow op [crnn/CTCBeamSearchDecoder: CTCBeamSearchDecoder] is not supported
Unsupported ops: Counter({'CTCBeamSearchDecoder': 1})

When looking at the operator kernel list beam search is listed, therefore I assumed it would be supported. Am I doing something wrong?

CaptainDario avatar Feb 10 '24 16:02 CaptainDario

Yes, it is highly possible that BeamSearch op in ORT could be mapped to CTCBeamSearchDecoder op directly.

To make the conversion happen, we need to add a mapping and set the attributes/inputs accordingly. One example is TensorScatterAdd op and adding relative tests.

And if possible, your contributions are definitely welcome!

fatcat-z avatar Mar 10 '24 13:03 fatcat-z

Thank you for your response! I am interested in this but need to put down my research for the next months. If nobody adds this maybe I will work on it in a few months but currently I am unsure.

CaptainDario avatar May 02 '24 03:05 CaptainDario