tagger.py 文件源码

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

项目:deep_srl 作者: luheng 项目源码 文件源码
def get_distribution_function(self):
    """ Return predictions and scores of shape [batch_size, time_steps, label space size].
        Used at test time.
    """
    scores0 = self.scores.reshape([self.x.shape[0], self.x.shape[1],
                     self.label_space_size]).dimshuffle(1, 0, 2)

    return theano.function([self.x0, self.mask0], [self.pred0, scores0],
                 name='f_pred',
                 allow_input_downcast=True,
                 on_unused_input='warn',
                 givens=({self.is_train:  numpy.cast['int8'](0)}))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号