提交 6b748cb2 authored 作者: James Bergstra's avatar James Bergstra

Reverting Dumi's change to getitem, needs more thought.

上级 95659370
...@@ -1715,6 +1715,13 @@ class GpuSubtensor(tensor.Subtensor): ...@@ -1715,6 +1715,13 @@ class GpuSubtensor(tensor.Subtensor):
cdata = tuple(map(convert, self.idx_list)) cdata = tuple(map(convert, self.idx_list))
if len(cdata) == 1: if len(cdata) == 1:
cdata = cdata[0] 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 # some numpy installations don't expose the __index__() methods for
# numpy.int8/16/32/64. Casting to python's int instead # numpy.int8/16/32/64. Casting to python's int instead
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论