提交 cfdab794 authored 作者: Razvan Pascanu's avatar Razvan Pascanu

dealt with the non inplace case

上级 22c5f77e
......@@ -260,8 +260,15 @@ class ScanOp(PureOp):
def p(node, args, outs):
pos = 0
cont = 1
# copy inputs if not inplace
if not self.inplace:
for _, _, val in state_buffers:
val[0] = val[0].copy()
for buf in non_numeric_states_bufs:
buf[0] = buf[0].copy()
# reset all switches if any
for sw in self.swithces:
for sw in self.switches:
sw.set_value(numpy.int8(0), borrow=True)
while cont and pos < node_input_storage[0][0]:
cont = self.fn()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论