For model checkpoint files (usually consist of .meta
, .data
, .index
) generated from TF-2.0, how can I convert it to onnx
or pb
file?
since I found most of the existing tools, such as tf2onnx
only support TF-1.x.
tf2onnx supports tf2, saved models, and checkpoint files. I would recommend making a saved model:
model.save("path")
Then use tf2onnx command line:
tf2onnx.convert --saved-model path/to/model --output model.onnx --opset 12