如何将Onnx模型(.onnx)转换为tensorflow(.pb)模型?

问题描述 投票:0回答:1

我试图将.onxx模型转换为.pb模型,我已经写好了代码,但我得到了错误。@tf_func(tif.ceil)AttributeError: module 'tensorflow' has no attribute 'ceil'.

import onnx
from tensorflow.python.tools.import_pb_to_tensorboard import import_to_tensorboard
from onnx_tf.backend import prepare
onnx_model = onnx.load("original_3dlm.onnx")
tf_rep = prepare(onnx_model)
tf_rep.export_graph("model_var.pb")
import_to_tensorboard("model_var.pb", "tb_log")

how to reslove this issue.Is there any other way to convert onxx to tensorflow then please help me.

tensorflow keras deep-learning neural-network pytorch
1个回答
2
投票

我用这个解决了这个问题。ONNX的Tensorflow后端.如果你有任何问题,让我知道.从tensorflow 2.0改到1.14.也许能解决这个问题。

© www.soinside.com 2019 - 2024. All rights reserved.