We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a528305 commit 1e5c007Copy full SHA for 1e5c007
stochman/geodesic.py
@@ -89,12 +89,12 @@ def closure():
89
90
for k in range(max_iter):
91
opt.step(closure=closure)
92
- if torch.max(torch.abs(curve.parameters.grad)) < thresh:
+ max_grad = max([p.grad.abs().max() for p in curve.parameters()])
93
+ if max_grad < thresh:
94
break
95
# if k % (max_iter // 10) == 0:
96
# curve.constant_speed(manifold)
- max_grad = torch.max(torch.abs(curve.parameters.grad))
97
- curve.constant_speed(manifold)
+ #curve.constant_speed(manifold)
98
return max_grad < thresh
99
100
0 commit comments