提交 77443932 authored 作者: Frederic Bastien's avatar Frederic Bastien

Fix a test in FAST_COMPILE

上级 88a30b02
...@@ -273,16 +273,18 @@ def test_debugprint(): ...@@ -273,16 +273,18 @@ def test_debugprint():
# test clients # test clients
s = StringIO() s = StringIO()
f = theano.function([A, B, D], [A + B, A + B - D]) # We must force the mode as otherwise it can change the clients order
f = theano.function([A, B, D], [A + B, A + B - D],
mode='FAST_COMPILE')
debugprint(f, file=s, print_clients=True) debugprint(f, file=s, print_clients=True)
s = s.getvalue() s = s.getvalue()
# The additional white space are needed! # The additional white space are needed!
reference = '\n'.join([ reference = '\n'.join([
"Elemwise{add,no_inplace} [id A] '' 0 clients:[('output', ''), ('[id C]', 1)]", "Elemwise{add,no_inplace} [id A] '' 0 clients:[('[id B]', 1), ('output', '')]",
" |A [id D]", " |A [id D]",
" |B [id E]", " |B [id E]",
"Elemwise{sub,no_inplace} [id C] '' 1", "Elemwise{sub,no_inplace} [id B] '' 1",
" |Elemwise{add,no_inplace} [id A] '' 0 clients:[('output', ''), ('[id C]', 1)]", " |Elemwise{add,no_inplace} [id A] '' 0 clients:[('[id B]', 1), ('output', '')]",
" |D [id F]", " |D [id F]",
]) + '\n' ]) + '\n'
if s != reference: if s != reference:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论