提交 b334d768 authored 作者: Shawn Tan's avatar Shawn Tan

Flake8 modifications

上级 dc1c85af
...@@ -611,7 +611,7 @@ class GpuAdvancedIncSubtensor(HideC, tensor.AdvancedIncSubtensor): ...@@ -611,7 +611,7 @@ class GpuAdvancedIncSubtensor(HideC, tensor.AdvancedIncSubtensor):
y = inp[1] y = inp[1]
idx = inp[2:] idx = inp[2:]
x = x.copy() x = x.copy()
for i in xrange(len(idx)): for i in range(len(idx)):
if isinstance(idx[i], gpuarray.GpuArray): if isinstance(idx[i], gpuarray.GpuArray):
idx[i] = np.asarray(idx[i]) idx[i] = np.asarray(idx[i])
...@@ -687,7 +687,7 @@ class GpuAdvancedIncSubtensor(HideC, tensor.AdvancedIncSubtensor): ...@@ -687,7 +687,7 @@ class GpuAdvancedIncSubtensor(HideC, tensor.AdvancedIncSubtensor):
# build the indices and use it # build the indices and use it
take_idx = sum(i * s for i, s in zip(nidx, strides)) take_idx = sum(i * s for i, s in zip(nidx, strides))
k = get_iadd(node.inputs[0], node.inputs[1]) k = get_iadd(node.inputs[0], node.inputs[1])
if x_flat.shape[-len(y_flat.shape):] == y_flat.shape or y_flat.shape == (): if x_flat.shape[-len(y_flat.shape):] == y_flat.shape or y_flat.shape == ():
for i in take_idx.flatten(): for i in take_idx.flatten():
tmp = pygpu.elemwise.elemwise2( tmp = pygpu.elemwise.elemwise2(
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论