Timonzimm / poincare-embedding

Poincaré Embeddings for Learning Hierarchical Representations (https://arxiv.org/abs/1705.08039) in PyTorch
MIT License
15 stars 3 forks source link

Typo in distance metric? #2

Closed matthias-samwald closed 6 years ago

matthias-samwald commented 6 years ago
def distance(u, v):
    uu = v.norm(dim=1)**2
    vv = v.norm(dim=1)**2
    uv = u.mm(v.t())`

Should this not read "uu = u.norm(..."?

Timonzimm commented 6 years ago

Thank you, I will further look into it when I have free time, don't hesitate to do a PR if you manage to make it work.