Skip to content

Commit 4134045

Browse files
committed
Add a warning about SPD projection
1 parent 6c06ba0 commit 4134045

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tensorflow_riemopt/manifolds/symmetric_positive.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
"""Manifolds of symmetric positive definite matrices."""
2+
import warnings
3+
24
import tensorflow as tf
35

46
from tensorflow_riemopt.manifolds.manifold import Manifold
@@ -35,6 +37,12 @@ def _check_vector_on_tangent(self, x, u, atol, rtol):
3537
return utils.allclose(u, u_t, atol, rtol)
3638

3739
def projx(self, x):
40+
warnings.warn(
41+
(
42+
"{}.projx performs a projection onto the open set of"
43+
+ " PSD matrices"
44+
).format(self.__class__.__name__)
45+
)
3846
x_sym = (utils.transposem(x) + x) / 2.0
3947
s, u, v = tf.linalg.svd(x_sym)
4048
sigma = tf.linalg.diag(tf.maximum(s, 0.0))

0 commit comments

Comments
 (0)