We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, In the manifolds.poincare.py, the square distance is defined as (line 26-32):
`
sqrt_c = c ** 0.5 dist_c = artanh( sqrt_c * self.mobius_add(-p1, p2, c, dim=-1).norm(dim=-1, p=2, keepdim=False) ) dist = dist_c * 2 / sqrt_c return dist ** 2
But according to the equation (2) in the paper, the square distance in Poincare ball should be like this `
sqrt_c = c ** 0.5 sq_norms_p1 = torch.sum(p1**2, dim=-1) sq_norms_p2 = torch.sum(p2**2, dim=-1) sq_d = torch.sum((p1-yp2)**2, dim=-1) dist_c = arcosh( 1 + 2*c*sq_d/(1+c*sq_norms_p1)/1+c*sq_norms_p2) ) dist = dist_c / sqrt_c return dist ** 2
The text was updated successfully, but these errors were encountered:
Hi, we used code related to hyperbolic space referring to HGCN. checkout, https://github.com/HazyResearch/hgcn/blob/a526385744da25fc880f3da346e17d0fe33817f8/manifolds/poincare.py#L25
Also, check this out another implementation, https://github.com/leymir/hyperbolic-image-embeddings/blob/9e84d35497598a1ba99a3c38ea79bfaf47f8d076/hyptorch/pmath.py#L205
I guess the mobius addition make both equation equivalent.
mobius addition
Sorry, something went wrong.
No branches or pull requests
Hi,
In the manifolds.poincare.py, the square distance is defined as (line 26-32):
`
`
But according to the equation (2) in the paper, the square distance in Poincare ball should be like this
`
`
The text was updated successfully, but these errors were encountered: