-
Notifications
You must be signed in to change notification settings - Fork 334
3d pose baseline
sngyo edited this page Nov 4, 2019
·
5 revisions
Export script for 3d-pose-baseline.
frozen_graph_def = tf.graph_util.convert_variables_to_constants(sess,sess.graph.as_graph_def(),["linear_model/add_1"])
import tf2onnx
from tf2onnx.optimizer.transpose_optimizer import TransposeOptimizer
graph1 = tf.Graph()
with graph1.as_default():
tf.import_graph_def(frozen_graph_def)
onnx_graph = tf2onnx.tfonnx.process_tf_graph(graph1, input_names=["import/inputs/enc_in:0"], output_names=["import/linear_model/add_1:0"],opset=10)
optimizer = TransposeOptimizer()
opt_model_proto = optimizer.optimize(onnx_graph)
model_proto = onnx_graph.make_model("3d-pose-baseline")
with open("3d-pose-baseline.onnx", "wb") as f:
f.write(model_proto.SerializeToString())
(c) 2019 ax Inc. & AXELL CORPORATION