-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Description
If you try to run a code on typed points like
using Manopt, Manifolds
using ManifoldDiff: grad_distance
M = Hyperbolic(2)
data = PoincareBallPoint.([ [0.1, 0.2], [0.3,0.25], [0.35,0.4] ])
n = length(data)
f(M, p) = sum(1 / (2 * n) * distance.(Ref(M), Ref(p), data) .^ 2)
grad_f(M, p) = sum(1 / n * grad_distance.(Ref(M), data, Ref(p)));
m1 = gradient_descent(M, f, grad_f, data[1])
This errors since the candidate point within Armijo line search is an array (from the default representation on Hyperbolic) due to this line
Manopt.jl/src/plans/stepsize/stepsize.jl
Line 106 in 962ae49
| candidate_point::P = allocate_result(M, rand), |
allocating a default random point. A solution could be to pass the initial point to step sizes as well (optionally, so they rand otherwise to be nonbreaking) and use that points type to allocate the candidate.
Might affect other step sizes as well that are linesearch based (i.e. need a candidate).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels