提交 97ba0f6b authored 作者: Razvan Pascanu's avatar Razvan Pascanu

added by default for nit_sot `n_steps` as number of steps

Now scan requires the user to say the number of steps. In case of outputs that do not feed anything in, if the user does not provide any information then it is assumed that you want all intermediate steps.
上级 e8158504
......@@ -172,8 +172,8 @@ def scan(fn,
outs_info[i]['taps'] = [-1]
else:
# if a None is provided as the output info we replace it
# with an empty dict() to simplify handling
outs_info[i] = dict()
# with an dict(steps=n_steps) to simplify handling
outs_info[i] = dict(steps=n_steps)
##
### Step 2. Generate inputs and outputs of the inner functions
......@@ -481,7 +481,7 @@ def scan(fn,
n_outs = len(dummy_f.maker.outputs)
if as_while:
n_outs = n_outs - 1
outs_info = [dict() for x in xrange(n_outs)]
outs_info = [dict('steps':n_steps) for x in xrange(n_outs)]
## Step 5.1 Outputs with taps different then -1
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论