elmo.py 文件源码

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

项目:document-qa 作者: allenai 项目源码 文件源码
def apply(self, is_train, x, mask=None):
        mask = tf.sequence_mask(mask, tf.shape(x)[1])
        output = weight_layers(1, x, mask, self.l2_coef, do_layer_norm=self.layer_norm,
                               use_top_only=self.top_layer_only)["weighted_ops"][0]
        return output
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号