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

normdist2plane potential implementation error? #14

Open
yangshengaa opened this issue Jul 18, 2022 · 0 comments
Open

normdist2plane potential implementation error? #14

yangshengaa opened this issue Jul 18, 2022 · 0 comments

Comments

@yangshengaa
Copy link

yangshengaa commented Jul 18, 2022

Hi! It looks like when norm=True, normdist2plane is multiplied by the incorrect term?

In normdist2plane, there is a line
a_norm = a.norm(dim=dim, keepdim=keepdim, p=2).clamp_min(MIN_NORM)
this is the euclidean norm

and subsequently, when norm=True,
res = res * a_norm

However, res, I believe, should be multiplied by the Riemannian norm. From equation 24 in Hyperbolic Neural Network, the distance is computed by
$$sign(\langle -p_k \oplus_c x, a_k\rangle) \sqrt{g^c_{p_k}(a_k, a_k)} d_c(x, \tilde{H}_{a_k, p_k})$$

And $\sqrt{g^c_{p_k}(a_k, a_k)}$ shall take the place of a_norm in the multiplication.

Please correct me if I am wrong. I appreciate your help in advance.

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

1 participant