提交 9364cd8e authored 作者: Razvan Pascanu's avatar Razvan Pascanu

use the new safe_new method for constructing copies of tensors

上级 a966c197
...@@ -887,7 +887,7 @@ def scan( fn ...@@ -887,7 +887,7 @@ def scan( fn
in dummy_f.maker.expanded_inputs in dummy_f.maker.expanded_inputs
if ( isinstance(arg.variable, SharedVariable) and if ( isinstance(arg.variable, SharedVariable) and
not arg.update) ] not arg.update) ]
other_shared_inner_args = [ new_variable(arg.variable) for arg other_shared_inner_args = [ safe_new(arg.variable, '_copy') for arg
in dummy_f.maker.expanded_inputs in dummy_f.maker.expanded_inputs
if ( isinstance(arg.variable, SharedVariable) and if ( isinstance(arg.variable, SharedVariable) and
not arg.update) ] not arg.update) ]
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论