Tensorflow to ONNX conversion error

I am trying to produce TensorRT engine for my Tensorflow model.
First step, TF model is converted to ONNX.

During conversion I have three errors.
2020-08-03 21:47:18,431 - ERROR - Tensorflow op [CTCGreedyDecoder: CTCGreedyDecoder] is not supported 2020-08-03 21:47:18,431 - ERROR - Tensorflow op [d_predictions: SparseToDense] is not supported 2020-08-03 21:47:18,431 - ERROR - Unsupported ops: Counter({'CTCGreedyDecoder': 1, 'SparseToDense': 1})

What should I do with these errors?

The whole conversion process is as follows.
I used opset12

python -m tf2onnx.convert --graphdef numplate_recg.pb --opset 12 --output numplate_recg.onnx --inputs input:0 --outputs d_predictions:0
2020-08-03 21:47:15,796 - WARNING - From /home/itc/venv/lib/python3.6/site-packages/tf2onnx/verbose_logging.py:76: The name tf.logging.set_verbosity is deprecated. Please use tf.compat.v1.logging.set_verbosity instead.

2020-08-03 21:47:18,198 - INFO - Using tensorflow=1.14.0, onnx=1.7.0, tf2onnx=1.6.3/d4abc8
2020-08-03 21:47:18,198 - INFO - Using opset <onnx, 12>
2020-08-03 21:47:18,431 - ERROR - Tensorflow op [CTCGreedyDecoder: CTCGreedyDecoder] is not supported
2020-08-03 21:47:18,431 - ERROR - Tensorflow op [d_predictions: SparseToDense] is not supported
2020-08-03 21:47:18,431 - ERROR - Unsupported ops: Counter({'CTCGreedyDecoder': 1, 'SparseToDense': 1})
2020-08-03 21:47:18,439 - INFO - Optimizing ONNX model
2020-08-03 21:47:18,638 - INFO - After optimization: Cast -4 (9->5), Const -17 (62->45), Identity -3 (3->0), Reshape +2 (3->5), Shape -1 (4->3), Squeeze -2 (4->2), Transpose -37 (41->4), Unsqueeze -3 (3->0)
2020-08-03 21:47:18,643 - INFO - 
2020-08-03 21:47:18,643 - INFO - Successfully converted TensorFlow model numplate_recg.pb to ONNX
2020-08-03 21:47:18,658 - INFO - ONNX model is saved at numplate_recg.onnx

Hi @edit_or,
Request you to share your model and the script so that i can assist you better.
Thanks!

I have uploaded to this link
Thanks

May I have any update on this? Thank you.

Hi @edit_or

CTCGreedyDecoder is currently not supported in TRT. Please refer to below link for more details.
https://github.com/onnx/onnx-tensorrt/blob/master/operators.md

You need to create a custom plugin for any unsupported layer.
Refer to the below link for the same.
https://github.com/NVIDIA/TensorRT/tree/master/samples/opensource/samplePlugin

Thanks

How about sparse to dense? Anyway thanks, I’ll create plugin.