Closed Wyatthy closed 2 years ago
tf2onnx.convert also supports convert a checkpoint to ONNX. Could you please try to upgrade your TF1 version to 1.15.0 which is covered by our CI and use --checkpoint parameter to convert this checkpoint without converting it to a pb file?
Thank you for the advice ! My superiors changed their strategy , so I avoided this question.
Dear All,
I would like to report the issue when converting tensorflow model(ckpt) to onnx model
Describe the bug I got a ckpt model on TF1 , then transformed it to
.pb
model bygraph_util.convert_variables_to_constants
in the environment of TF2 , when i usedpython -m tf2onnx.convert
command to convert it to.onnx
, i got the ERROR:A clear and concise description of what the bug is.
System information
To Reproduce 1/ got a
.pb
model from ckpt model with the code:2/ run command to convert
.pb
model to onnx model:Additional context I know this issue is similar to 1152#issue-732119197 , and in my model , i do used tf.Variable , but i don't know how to freeze it . BTW , the code how i saved model as ckpt is below: