提交 26d16942 authored 作者: Razvan Pascanu's avatar Razvan Pascanu

Add the option of not always providing a tag when reconstructing the graph.

上级 850c24f0
......@@ -726,13 +726,15 @@ def flatten(l):
return sum(l , [])
def reconstruct_graph(inputs, outputs, tag):
def reconstruct_graph(inputs, outputs, tag = None):
"""
Different interface to clone, that allows you to pass inputs.
Compared to clone, this method always replaces the inputs with
new variables of the same type, and returns those ( in the same
order as the original inputs).
"""
if tag is None:
tag = ''
nw_inputs = [safe_new(x,tag) for x in inputs]
givens = {}
for nw_x, x in zip(nw_inputs, inputs):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论