提交 e2f2cbd4 authored 作者: Frederic's avatar Frederic

fix crash if we call pydotprint multiples times on the same Theano function

上级 6da41477
...@@ -804,6 +804,9 @@ def pydotprint(fct, outfile=None, ...@@ -804,6 +804,9 @@ def pydotprint(fct, outfile=None,
# Update the inputs that have an update function # Update the inputs that have an update function
input_update = {} input_update = {}
# Here outputs can be the original list, as we should not change
# it, we must copy it.
outputs = list(outputs)
if isinstance(fct, Function): if isinstance(fct, Function):
for i in reversed(fct.maker.expanded_inputs): for i in reversed(fct.maker.expanded_inputs):
if i.update is not None: if i.update is not None:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论