提交 262bb743 authored 作者: Frederic Bastien's avatar Frederic Bastien 提交者: Frederic

Work around a not implemented Scan case that can be introduced by opt.

上级 2bf6d218
......@@ -972,6 +972,11 @@ class ScanSaveMem(gof.Optimizer):
# twice since bad things usually happen if I do that
info['_scan_savemem_visited'] = True
# TODO: currently we don't support scan with 0 step. So
# don't create one.
if theano.tensor.extract_constant(node_ins[0]) == 0:
return
# Do not call make_node for test_value
new_outs = scan_op.Scan(inps, outs, info)(*node_ins,
**dict(return_list=True))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论