0
点赞
收藏
分享

微信扫一扫

pb转onnx报错 AssertionError: p is not in graph

原因:参数输入格式不对

调用参数格式:

onnx_model, _ = tf2onnx.convert.from_graph_def(graph_def=output_graph_def, input_names=["embedding:0","mask:0"], output_names="predict_outputs:0", opset=13)

output_names:传入参数为list,字符串会被按照字母在模型节点中查找

pb转onnx报错 AssertionError: p is not in graph_字符串

解决放法:

onnx_model, _ = tf2onnx.convert.from_graph_def(graph_def=output_graph_def, input_names=["embedding:0","mask:0"], output_names=["predict_outputs:0"], opset=13)


举报

相关推荐

0 条评论