import tensorflow as tf

            if use_coverage and coverage is not None:
                coverage_features = tf.expand_dims(coverage, axis=-1) * w_c # [batch_size, passage_len, attention_vec_size]
                all_features += coverage_features
            e = tf.reduce_sum(v * tf.tanh(all_features), axis=-1) # [batch_size, passage_len]
            attn_dist = nn_ops.softmax(e) # [batch_size, passage_len]
            attn_dist *= passage_mask
