Skip to content

Commit

Permalink
Merge 44e3fce into 03a2542
Browse files Browse the repository at this point in the history
  • Loading branch information
ferrine committed Nov 14, 2019
2 parents 03a2542 + 44e3fce commit 283b568
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions geoopt/manifolds/poincare/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ def dist(
) -> torch.Tensor:
return math.dist(x, y, c=self.c, keepdim=keepdim, dim=dim)

def dist2(
self, x: torch.Tensor, y: torch.Tensor, *, keepdim=False, dim=-1
) -> torch.Tensor:
return math.dist(x, y, c=self.c, keepdim=keepdim, dim=dim) ** 2

def egrad2rgrad(self, x: torch.Tensor, u: torch.Tensor, *, dim=-1) -> torch.Tensor:
return math.egrad2rgrad(x, u, c=self.c, dim=dim)

Expand Down

0 comments on commit 283b568

Please sign in to comment.