a2_transformer_classification.py 文件源码

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

项目:text_classification 作者: brightmart 项目源码 文件源码
def get_mask(self,sequence_length):
        lower_triangle = tf.matrix_band_part(tf.ones([sequence_length, sequence_length]), -1, 0)
        result = -1e9 * (1.0 - lower_triangle)
        print("get_mask==>result:", result)
        return result
# test started: learn to predict the bigger number in two numbers from specific location of array.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号