提交 c4a93fe3 authored 作者: Frederic's avatar Frederic

pep8

上级 4c9da17e
...@@ -20,7 +20,6 @@ from theano.sandbox.gpuarray.elemwise import GpuElemwise ...@@ -20,7 +20,6 @@ from theano.sandbox.gpuarray.elemwise import GpuElemwise
from theano.sandbox.gpuarray.comp import NVCC_compiler from theano.sandbox.gpuarray.comp import NVCC_compiler
class GpuSubtensor(HideC, Subtensor): class GpuSubtensor(HideC, Subtensor):
def make_node(self, x, *inputs): def make_node(self, x, *inputs):
rval = tensor.Subtensor.make_node(self, x, *inputs) rval = tensor.Subtensor.make_node(self, x, *inputs)
...@@ -232,7 +231,8 @@ class GpuIncSubtensor(IncSubtensor): ...@@ -232,7 +231,8 @@ class GpuIncSubtensor(IncSubtensor):
# scalar case # scalar case
if not self.set_instead_of_inc: if not self.set_instead_of_inc:
#x.__setitem__(cdata, sub_x + y) #x.__setitem__(cdata, sub_x + y)
tmp = pygpu.elemwise.elemwise2(sub_x, '+', y, sub_x, broadcast=False) tmp = pygpu.elemwise.elemwise2(sub_x, '+', y, sub_x,
broadcast=False)
x.__setitem__(cdata, tmp) x.__setitem__(cdata, tmp)
else: else:
x.__setitem__(cdata, y) x.__setitem__(cdata, y)
...@@ -592,4 +592,4 @@ class GpuAdvancedIncSubtensor1_dev20(GpuAdvancedIncSubtensor1): ...@@ -592,4 +592,4 @@ class GpuAdvancedIncSubtensor1_dev20(GpuAdvancedIncSubtensor1):
return; return;
} }
""" %locals() """ % locals()
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论