backport to python2.4

上级 474a1c25
......@@ -1701,20 +1701,6 @@ class GpuSubtensor(tensor.Subtensor):
cdata = cdata[0]
out[0] = x.__getitem__(cdata)
if 0:
# JSB: commenting this out because it breaks code and does not look right
# Dumi could you try to run the examples in the DeepLearningBenchmarks
# for example? This logic doesn't seem right -- we just
# cast cdata to a tuple, so it doesn't have a .start field.
# some numpy installations don't expose the __index__() methods for
# numpy.int8/16/32/64. Casting to python's int instead
start = int(cdata.start) if cdata.start!=None else None
stop = int(cdata.stop) if cdata.stop!=None else None
step = int(cdata.step) if cdata.step!=None else None
newslice = slice(start,stop,step)
out[0] = x.__getitem__(newslice)
class GpuIncSubtensor(tensor.IncSubtensor):
def make_node(self, x, y, *inputs):
assert isinstance(x.type, CudaNdarrayType)
......
......@@ -595,5 +595,5 @@ def computeH(V,W,b,d):
return H
from . import ConvGrad3D
from . import ConvTransp3D
import ConvGrad3D
import ConvTransp3D
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论