feedforward.py 文件源码

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

项目:seq2graph 作者: masterkeywikz 项目源码 文件源码
def _setup_vars(self, sparse_input):
        '''Setup Theano variables for our network.

        Parameters
        ----------
        sparse_input : bool
            Unused -- theanets does not support autoencoders with sparse input.

        Returns
        -------
        vars : list of theano variables
            A list of the variables that this network requires as inputs.
        '''
        assert not sparse_input, 'Theanets does not support sparse autoencoders!'

        # x represents our network's input (and target outputs).
        self.x = TT.matrix('x')

        # the weight array is provided to ensure that different target values
        # are taken into account with different weights during optimization.
        self.weights = TT.matrix('weights')

        if self.weighted:
            return [self.x, self.weights]
        return [self.x]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号