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

make the code look for constants as well beside shared variables ( and not

treat them like any other theano tensor)
上级 91cb7e8d
......@@ -708,13 +708,11 @@ def scan( fn
ordered_args +
non_seqs )
# add only the non-shared variables to the arguments of the dummy
# function [ a function should not get shared variables as input ]
# this could happen if for example the initial state of an output is a
# shared variable for which we use only the last step (i.e. no
# subtensort is applied to the shared variable )
# add only the non-shared variables and non-constants to the arguments of the dummy
# function [ a function should not get shared variables or constants as input ]
dummy_args = [arg for arg in args
if not isinstance(arg, SharedVariable)]
if (not isinstance(arg, SharedVariable) and
not isinstance(arg, tensor.Constant) )]
# when we apply the lambda expression we get a mixture of update rules
# and outputs that needs to be separated
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论