encoding.py 文件源码

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

项目:wi_wacv14 作者: VChristlein 项目源码 文件源码
def normalizeEnc(enc, method):
    """
    normalize encoding w. global normalization scheme(s)

    parameters:
        enc: the encoding vector to normalize
        method:
            'ssr': signed square root
            'l2g': global l2 normalization
    """
    # ssr-normalization (kinda hellinger-normalization)
    if 'ssr' in method:
        enc = np.sign(enc) * np.sqrt(np.abs(enc))

    if 'l2g' in method:
        enc = preprocessing.normalize(enc)

    return enc
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号