提交 a1839905 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Fix problems in test_printing.py

These come from a merge? Maybe? And they only show up in python2?
上级 c5f31b52
...@@ -495,17 +495,17 @@ def test_scan_debugprint3(): ...@@ -495,17 +495,17 @@ def test_scan_debugprint3():
def test_scan_debugprint4(): def test_scan_debugprint4():
def fn(a_m2, a_m1, b_m2, b_m1): def fn(a_m2, a_m1, b_m2, b_m1):
return a_m1+a_m2, b_m1+b_m2 return a_m1 + a_m2, b_m1 + b_m2
a0 = theano.shared(numpy.arange(2)) a0 = theano.shared(numpy.arange(2))
b0 = theano.shared(numpy.arange(2)) b0 = theano.shared(numpy.arange(2))
(a, b), _ = theano.scan(fn, outputs_info=[ (a, b), _ = theano.scan(
{'initial': a0, 'taps': [-2, -1]}, fn, outputs_info=[{'initial': a0, 'taps': [-2, -1]},
{'initial': b0, 'taps': [-2, -1]}], {'initial': b0, 'taps': [-2, -1]}],
n_steps=5) n_steps=5)
final_result = a+b final_result = a + b
output_str = theano.printing.debugprint(final_result, file='str') output_str = theano.printing.debugprint(final_result, file='str')
lines = [] lines = []
for line in output_str.split('\n'): for line in output_str.split('\n'):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论