提交 7515910e authored 作者: Frederic Bastien's avatar Frederic Bastien

'Fix test in DebugMode. We don't implement optimization with the borrow flag on…

'Fix test in DebugMode. We don't implement optimization with the borrow flag on output in DebugMode.'
上级 834217fa
...@@ -304,8 +304,14 @@ class T_function(unittest.TestCase): ...@@ -304,8 +304,14 @@ class T_function(unittest.TestCase):
assert (out==4).all() assert (out==4).all()
out[0]=3 out[0]=3
out2 = f() out2 = f()
assert out2 is out
assert (out2==3).all() if isinstance(theano.compile.mode.get_default_mode(),
theano.compile.DebugMode):
# In DebugMode, we don't implement optimization based on borrow on the output.
assert (out2==4).all()
else:
assert out2 is out
assert (out2==3).all()
def test_borrow_input(self): def test_borrow_input(self):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论