提交 8d52b596 authored 作者: Razvan Pascanu's avatar Razvan Pascanu

better comments

上级 cc574b89
......@@ -192,19 +192,18 @@ class Scan(PureOp):
def make_node(self, *inputs):
"""
Conventions:
inner_? - the variable corresponding to ? in the inner function
inner_X - the variable corresponding to X in the inner function
of scan (the lambda function executed at every time
step)
outer_? - the variable corresponding to ? in the outer graph,
outer_X - the variable corresponding to X in the outer graph,
i.e. the main graph (where the scan op lives)
inner_?_out - the variable representing the new value of ? after
inner_X_out - the variable representing the new value of X after
executing one step of scan (i.e. outputs given by
the inner function)
"""
assert numpy.all(isinstance(i, gof.Variable) for i in inputs)
# Check that the number of inputs to the Scan node corresponds to
# the number of inputs of the inner function of scan
n_outer_ins = len(inputs) - len(self.outer_nitsot(inputs)) - 1
n_inner_ins = (len(self.inner_seqs(self.inputs)) +
len(self.mitmot_taps()) +
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论