提交 6c60f4b8 authored 作者: Frederic's avatar Frederic

fix test in debugmode.

上级 ab1deaad
...@@ -905,7 +905,10 @@ class T_subtensor(theano.tensor.tests.test_basic.T_subtensor): ...@@ -905,7 +905,10 @@ class T_subtensor(theano.tensor.tests.test_basic.T_subtensor):
# Test with input strided # Test with input strided
t = self.adv_sub1()(n[::-1], idx) t = self.adv_sub1()(n[::-1], idx)
t.owner.op.perform_using_take = fast #DebugMode do a copy of the input, so we loose the strides.
if not isinstance(theano.compile.get_default_mode(),
theano.compile.DebugMode):
t.owner.op.perform_using_take = fast
val = theano.function([], t, mode=self.mode)() val = theano.function([], t, mode=self.mode)()
val = numpy.asarray(val) val = numpy.asarray(val)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论