Skip to content

Commit a25ea89

Browse files
committed
Update example to also use dist2 function
1 parent 71ec26f commit a25ea89

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

examples/local_pca_mnist.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ def get_subset_mnist(n: int = 1000):
6666
C, success = DM.connecting_geodesic(p0, p1)
6767
C.plot()
6868

69+
t = torch.linspace(0, 1, 100)
70+
with torch.no_grad():
71+
print(DM.curve_length(C(t)))
72+
print(DM.dist2(p0, p1).sqrt())
73+
6974
# p = C.begin
7075
# with torch.no_grad():
7176
# v = C.deriv(torch.zeros(1))

0 commit comments

Comments
 (0)