Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I was confused by the functions of local_dist() #13

Open
dongzwhitsz opened this issue Nov 14, 2019 · 1 comment
Open

I was confused by the functions of local_dist() #13

dongzwhitsz opened this issue Nov 14, 2019 · 1 comment

Comments

@dongzwhitsz
Copy link

你好,我在学习你写的代码的时候,对于你的一段在local_dist()函数中的代码产生了疑惑。你使用了这个函数,直接计算了两个三维矩阵的距离。我理解中的做法,是在实际使用过程中,x和y是同一个矩阵,其维数相同,把这两个矩阵给做一个按实例样本数做第一维,剩余的做flatten之后求其欧拉距离或者余弦距离。但是你的做法是把通道数最后一维, 把其的flatten,求欧拉距离之后,再使用了一个 (exp(x) - 1) / (exp(x) + 1), 这个函数的作用是用作把值归到[0, 1]的么,这种的归一化我还没有见过,这是某种特殊的作法么?其次你把距离矩阵的维做了交换之后使用了一次动态规划来求一个距离矩阵,那这意思可能是之前在做的都是在求一个关于距离长度度量的一个矩阵,我对此做法感到很不解。我也在网上找了一些资料,但是没有找到类似做法的解释。如果可以,你可以给我一些帮助么。感谢老铁, 你的这个代码写的很棒。

@earhian
Copy link
Owner

earhian commented Jun 24, 2020

我都没注意到这个细节,我当时参考某个行人reid里的细节

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants