提交 6fa0e7ef authored 作者: Guillaume Desjardins's avatar Guillaume Desjardins

Fixed crash in scan optimization, which prevented my specific graph from running

on GPU.
上级 4d943bea
......@@ -636,9 +636,13 @@ class ScanSaveMem(gof.Optimizer):
# a) the input is a set_subtensor, in that case we
# can replace the initial tensor by a slice,
# b) it is not, and we simply take a slice of it.
#TODO: commit change below with Razvan
if (nw_inputs[offset + idx].owner and
isinstance(nw_inputs[offset + idx].owner.op,
tensor.IncSubtensor)):
tensor.IncSubtensor) and
isinstance(nw_inputs[offset+idx].owner.op.idx_list[0], slice)):
_nw_input = nw_inputs[offset + idx].owner.inputs[1]
val = tensor.as_tensor_variable(val)
initl = tensor.as_tensor_variable(init_l[i])
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论