def test_debug_mode_dict(self):
'''
Tests that debug mode works where outputs is a dictionary.
'''
x = T.scalar('x')
f = theano.function([x], outputs={'1': x, '2': 2 * x,
'3': 3 * x}, mode="DEBUG_MODE")
result = f(3.0)
assert result['1'] == 3.0
assert result['2'] == 6.0
assert result['3'] == 9.0
test_dictionary_output.py 文件源码
python
阅读 32
收藏 0
点赞 0
评论 0
评论列表
文章目录