tensorflow-onnx
tensorflow-onnx copied to clipboard
Conversion of checkpoint + config to ONNX
Hi,
I have a DeepLab 2 TensorFlow checkpoint that I want to convert to ONNX. The conversion to saved_model seems to be buggy so I was wondering whether there's a way to convert it straight to ONNX.
Thanks!
Could you please describe more details about how you did the conversion and what are buggy things?
@fatcat-z I didn't do a conversion yet. I have a TensorFlow Panoptic Deeplab model checkpoint and config file, that there's currently a bug in the code that prohibits me from exporting the checkpoint and config to a saved_model file. Furthermore, if I use the Deeplab2 repo code, inference doesn't run well, only when performed as eval during the model training. I saw someone mentioning in one of the issues that they were in a similar situation and were able to export a checkpoint + config file directly to an ONNX model. I can easily load the model as a trained DeepLab module. Can I somehow convert a DeepLab module to an ONNX model?
@fatcat-z Jay Zhang FTE I didn't do a conversion yet. I have a TensorFlow Panoptic Deeplab model checkpoint and config file, that there's currently a bug in the code that prohibits me from exporting the checkpoint and config to a saved_model file. Furthermore, if I use the Deeplab2 repo code, inference doesn't run well, only when performed as eval during the model training. I saw someone mentioning in one of the issues that they were in a similar situation and were able to export a checkpoint + config file directly to an ONNX model. I can easily load the model as a trained DeepLab module. Can I somehow convert a DeepLab module to an ONNX model?
TF2ONNX could load checkpoint and export it to ONNX. Could you please go through the usage here to see if any of them can meet your requirement?
@fatcat-z I reviewed that file previously. I don't have a metagraph so I can't use, unfortunately, the checkpoint method. Maybe I need to dive into the code and change the way the saved model is loaded (for example) to the way I load the model with checkpoint and config and try converting from that point
It's been over 2 months, so closing this. Feel free to open a new one if the issue still exists.