Skip to content

Commit

Permalink
fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
tao-harald committed Nov 24, 2020
1 parent ff5f914 commit 07cd93d
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions geoopt/manifolds/symmetric_positive_definite.py
@@ -1,4 +1,3 @@
from functools import partial
from typing import Optional, Tuple, Union
import torch
from .base import Manifold
Expand Down Expand Up @@ -255,5 +254,13 @@ def extra_repr(self) -> str:

def transp(self, x: torch.Tensor, y: torch.Tensor, v: torch.Tensor) -> torch.Tensor:
inv_sqrt_x, sqrt_x = batch_linalg.sym_inv_sqrtm2(x)
exp_x_y = batch_linalg.sym_expm(0.5 * batch_linalg.sym_logm(inv_sqrt_x @ y @ inv_sqrt_x))
return sqrt_x @ exp_x_y @ batch_linalg.sym(inv_sqrt_x @ v @ inv_sqrt_x) @ exp_x_y @ sqrt_x
exp_x_y = batch_linalg.sym_expm(
0.5 * batch_linalg.sym_logm(inv_sqrt_x @ y @ inv_sqrt_x)
)
return (
sqrt_x
@ exp_x_y
@ batch_linalg.sym(inv_sqrt_x @ v @ inv_sqrt_x)
@ exp_x_y
@ sqrt_x
)

0 comments on commit 07cd93d

Please sign in to comment.