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
评论列表
文章目录