提交 a966c197 authored 作者: Razvan Pascanu's avatar Razvan Pascanu

do not consider constants as normal inputs to scan

上级 0dfefe84
......@@ -864,7 +864,13 @@ def scan( fn
other_inner_args = []
other_scan_args += [ arg for arg in non_seqs
if not isinstance(arg, SharedVariable) ]
if (not isinstance(arg, SharedVariable) and
not isinstance(arg, tensor.Constant))]
## Step 5.6 all shared variables with no update rules
other_inner_args += [ safe_new(arg,'_copy') for arg in non_seqs
if (not isinstance(arg, SharedVariable) and
not isinstance(arg, tensor.Constant))]
## Step 5.6 all non sequences including shared variables with no update rules
def new_variable( v ):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论