提交 ae71e6b1 authored 作者: Pierre Luc Carrier's avatar Pierre Luc Carrier

Update comments

上级 54ba8808
......@@ -1372,9 +1372,11 @@ class Scan(PureOp):
return global_connection_pattern
def connection_pattern(self, node):
# We cache this, as grad call connection_pattern, and it call
# grad in its turn. I was a case where theano.grad() took 4h
# that had many scan one inside each others.
# We cache the result of this function because, with a previous
# implementation that repeatedly called grad, there were cases
# where calls to theano.grad() took as much as 4h for functions
# containing many nested scans.
if hasattr(node.tag, 'connection_pattern'):
return node.tag.connection_pattern
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论