mkl.py 文件源码

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

项目:TFFRCNN 作者: InterVideo 项目源码 文件源码
def __call__(self, X, Y=None):
        XX = np.sum(X * X, axis=1)[:,np.newaxis]
        if Y is None:
            Y = X
            YY = XX.T
        else:
            YY = np.sum(Y * Y, axis=1)[np.newaxis,:]
        distances = XX + YY # Using broadcasting
        distances -= 2 * np.dot(X, Y.T)
        distances = np.maximum(distances, 0)
        return np.exp(- self.gamma * distances)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号