提交 e4449111 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Of course you also need to modify the *other* scan.

上级 31823494
...@@ -40,7 +40,8 @@ def scan(fn, ...@@ -40,7 +40,8 @@ def scan(fn,
n_steps=None, n_steps=None,
mode=None, mode=None,
name=None, name=None,
profile=False): profile=False,
allow_gc=None):
""" """
Similar to Theano's official scan, this function gives the user more Similar to Theano's official scan, this function gives the user more
control over the scan op, avoiding certain difficulties that arose from control over the scan op, avoiding certain difficulties that arose from
...@@ -115,6 +116,8 @@ def scan(fn, ...@@ -115,6 +116,8 @@ def scan(fn,
seqs = wrap_into_list(sequences) seqs = wrap_into_list(sequences)
outs_info = wrap_into_list(states) outs_info = wrap_into_list(states)
if allow_gc is None:
allow_gc = config.scan.allow_gc
# Make sure we get rid of numpy arrays or ints or anything like that # Make sure we get rid of numpy arrays or ints or anything like that
# passed as inputs to scan # passed as inputs to scan
...@@ -627,6 +630,7 @@ def scan(fn, ...@@ -627,6 +630,7 @@ def scan(fn,
info['as_while'] = as_while info['as_while'] = as_while
info['profile'] = profile info['profile'] = profile
info['_scan_savemem_visited'] = True info['_scan_savemem_visited'] = True
info['allow_gc'] = allow_gc
local_op = scan_op.Scan(inner_inputs, new_outs, info) local_op = scan_op.Scan(inner_inputs, new_outs, info)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论