提交 5f93bdf5 authored 作者: Amir Elaguizy's avatar Amir Elaguizy

Update doc/tutorial/loop.txt

It is unclear that A was an argument to inner_fct, because it is masking a variable named A in the surrounding scope. This was VERY confusing when trying to understand this code.
上级 d61c929b
......@@ -35,8 +35,8 @@ The full documentation can be found in the library: :ref:`Scan <lib_scan>`.
k = T.iscalar("k")
A = T.vector("A")
def inner_fct(prior_result, A):
return prior_result * A
def inner_fct(prior_result, B):
return prior_result * B
# Symbolic description of the result
result, updates = theano.scan(fn=inner_fct,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论