提交 4e787ee9 authored 作者: slefrancois's avatar slefrancois

added test for unused explicit input in test_copy_delete_updates

上级 03281b5f
......@@ -383,12 +383,14 @@ class T_function(unittest.TestCase):
assert cpy(1)[0] == 4
assert cpy(1)[0] == 4
# Test if unused implicit inputs from delete_updates are ignored
# as intended.
# Test if unused implicit and explicit inputs from delete_updates
# are ignored as intended.
for mode in ["FAST_RUN", "FAST_COMPILE"]:
ori = theano.function([x], x, mode=mode, updates={z: z * 2})
cpy = ori.copy(delete_updates=True)
ori = theano.function([x, y], x, mode=mode, updates={z: z + y})
cpy = ori.copy(delete_updates=True)
def test_shared_state0(self):
a = T.scalar() # the a is for 'anonymous' (un-named).
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论