tripletnet.py 文件源码

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

项目:TripletEmbedding 作者: hrantzsch 项目源码 文件源码
def l2norm(self, x):
        """
        Force embeddings onto a hypershere.
        This has been done in
        Schroff et al. “FaceNet: A Unified Embedding for Face Recognition and
        Clustering.” arXiv:1503.03832 [cs], March 12, 2015.
        http://arxiv.org/abs/1503.03832.
        However it did not work out for me very well, so this function is
        currently not used.
        """
        return F.local_response_normalization(x, n=x.data.shape[1]*2,
                                              k=0, alpha=1, beta=0.5)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号