提交 e032bb8f authored 作者: Frederic Bastien's avatar Frederic Bastien

preserve the name when we change variable in optimizer in debug mode.

上级 0eb4e238
......@@ -463,6 +463,10 @@ def _optcheck_env(input_specs, output_specs, accept_inplace = False):
# We need to protect all immutable inputs from inplace operations.
env.extend(Supervisor(input for spec, input in zip(input_specs, inputs) if not (spec.mutable or (hasattr(env, 'destroyers') and env.destroyers(input)))))
# If named nodes are replaced, keep the name
env.extend(gof.toolbox.PreserveNames())
return env, map(SymbolicOutput, updates), equivalence_tracker
def _check_inputs(node, storage_map, r_vals, dr_vals, active_nodes, clobber_dr_vals=True,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论