提交 d83371a2 编写于 作者: C Channingss

update

上级 4f51c4d0
...@@ -408,7 +408,6 @@ class BaseAPI: ...@@ -408,7 +408,6 @@ class BaseAPI:
for v in test_outputs_names for v in test_outputs_names
] ]
# Make graph # Make graph
onnx_name = 'test'
onnx_graph = helper.make_graph( onnx_graph = helper.make_graph(
nodes=onnx_nodes, nodes=onnx_nodes,
name=onnx_name, name=onnx_name,
...@@ -431,6 +430,8 @@ class BaseAPI: ...@@ -431,6 +430,8 @@ class BaseAPI:
if onnx_model is not None: if onnx_model is not None:
try: try:
onnx_model_file = osp.join(save_dir, onnx_name) onnx_model_file = osp.join(save_dir, onnx_name)
if not os.path.exists(save_dir):
os.mkdir(save_dir)
with open(onnx_model_file, 'wb') as f: with open(onnx_model_file, 'wb') as f:
f.write(onnx_model.SerializeToString()) f.write(onnx_model.SerializeToString())
print( print(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册