def test_output_order_sorted(self):
'''
Tests that the output keys are sorted correctly.
'''
x = T.scalar('x')
y = T.scalar('y')
z = T.scalar('z')
e1 = T.scalar('1')
e2 = T.scalar('2')
f = theano.function([x, y, z, e1, e2], outputs={'x': x, 'y': y, 'z': z,
'1': e1, '2': e2})
assert '1' in str(f.outputs[0])
assert '2' in str(f.outputs[1])
assert 'x' in str(f.outputs[2])
assert 'y' in str(f.outputs[3])
assert 'z' in str(f.outputs[4])
test_dictionary_output.py 文件源码
python
阅读 19
收藏 0
点赞 0
评论 0
评论列表
文章目录