model.py 文件源码

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

项目:entity_binding 作者: JasperGuo 项目源码 文件源码
def _calc_scores(self, attention_scores):
        """
        Combine exact match scores & attention scores
        :param attention_scores:   [batch_size, max_question_length, table_size]
        :return:
        """
        with tf.variable_scope("scoring"):
            scores = attention_scores
            tf.check_numerics(scores, message="Score Nan...")
            softmax_scores = tf.nn.softmax(scores, dim=-1)
            tf.check_numerics(softmax_scores, message="Softmax Score Nan...")
            return softmax_scores
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号