提交 5e80f021 编写于 作者: M Megvii Engine Team

fix(mge/network): fix Network not returning dump_info to align trace.dump

GitOrigin-RevId: 865adf75e2549d53bda0cbb44d20f39276c1dc09
上级 7ecdbf25
......@@ -241,7 +241,7 @@ class Network:
metadata.optimize_options = optimize_options
G.set_priority_to_id([o._node if isinstance(o, G.VarNode) else o for o in out])
dump_content, _ = G.dump_graph(
dump_content, dump_info = G.dump_graph(
out,
keep_var_name=keep_var_name,
keep_opr_name=keep_opr_name,
......@@ -255,6 +255,7 @@ class Network:
permission = "wb" if append == False else "ab"
file = open(file, permission)
file.write(dump_content)
return dump_info
def make_const(self, data, name=None, device=None):
r"""Makes an ImmutableTensor OpNode to provide a parameter for the network."""
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册