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

pep8 compatibility

上级 b0545f4e
......@@ -197,6 +197,7 @@ class ScanOp(PureOp):
aux_buffers = node_input_storage[1 + len(base_inputs):]
# 2.1 First the auxiliary arguments, those that are parameters or
# input
def fake_shared(var):
val = 0
for dim in xrange(var.ndim):
......@@ -214,7 +215,7 @@ class ScanOp(PureOp):
borrow=True)
elif isinstance(var, TensorType):
givens[var] = fake_shared(var)
aux_buffers.append((givens[var],mem_buf))
aux_buffers.append((givens[var], mem_buf))
else:
givens[var] = var.type()
non_tensor_args.append(givens[var])
......@@ -232,7 +233,6 @@ class ScanOp(PureOp):
state_buffers.append((givens[var], self.lengths[pos], mem_buf))
updates[givens[var]] = expr
#2.3 Non-numeric states
n_non_numeric = len(self.outputs) - n_numeric_values
fn_outs = self.outputs[n_numeric_values:]
......@@ -256,6 +256,7 @@ class ScanOp(PureOp):
# 3.2 Construct the perform
if self.as_repeatUntil is not None:
# 3.2.1 as a repeat until
def p(node, args, outs):
pos = 0
......@@ -300,6 +301,7 @@ class ScanOp(PureOp):
out_buf[0] = in_buf[0]
else:
# 3.2.2 as a for
def p(node, args, outs):
# copy inputs if not inplace
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论