test_dictionary_output.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:Theano-Deep-learning 作者: GeekLiB 项目源码 文件源码
def test_output_list_still_works(self):

        '''
        Test that theano.function works if outputs is a list.
        '''

        x = T.scalar('x')

        f = theano.function([x], outputs=[x * 3, x * 2, x * 4, x])

        result = f(5.0)

        assert result[0] == 15.0
        assert result[1] == 10.0
        assert result[2] == 20.0
        assert result[3] == 5.0
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号