提交 8d0db6ed authored 作者: Razvan Pascanu's avatar Razvan Pascanu

fixed refrence to the output buffer

it was a mistake due to the list of list approach for the storage maps
上级 77d77caa
......@@ -374,15 +374,16 @@ class ScanPermutation(gof.Op):
out = outputs[0]
if index % membuffer.shape[0] == 0:
if self.inplace:
outputs[0] = membuffer
out[0] = membuffer
else:
outputs[0][:] = membuffer
out[0] = membuffer.copy()
else:
pos = index % membuffer.shape[0]
if outputs[0] is membuffer:
membuffer = membuffer.copy()
outputs[0][:membuffer.shape[0] - p] = membuffer[p:]
outputs[0][membuffer.shape[0] - p:] = membuffer[:p]
print pos
out[0][:membuffer.shape[0] - pos] = membuffer[pos:]
out[0][membuffer.shape[0] - pos:] = membuffer[:pos]
def R_op(self, inputs, eval_points):
if eval_points[0] is None:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论