提交 fdcaa5a0 authored 作者: Ian Goodfellow's avatar Ian Goodfellow

added a test for the bug that was making the pylearn2 tests fail

上级 fa0cb5d5
......@@ -395,6 +395,16 @@ def test_disconnected_nan():
def test_sum_disconnected():
# Tests that we can add DisconnectedType to other terms correctly
x = theano.tensor.scalar()
y = x * 2.
z = x + 1.
cost = y + z
theano.tensor.grad(cost, x, consider_constant=[y,z])
# In an earlier version of theano, the above line would have failed
# while trying to add two DisconnectedTypes
if __name__ == '__main__':
unittest.main()
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论