You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A recent Slack discussion has an excellent example of catastrophic error accumulation on a sphere:
julia>using Manifolds, LinearAlgebra, Manopt, ManifoldDiff, ReverseDiff
julia> N =1010
julia> Z =2*rand(3,N) .-13×10 Matrix{Float64}:0.03437910.6594340.881657…-0.4815770.749162-0.7826730.0679203-0.00865486-0.5322750.32810.336010.7997460.1511410.638862-0.386737-0.329479-0.492241-0.122683
julia> Z = Z ./map(norm, eachslice(Z, dims=2))'3×10 Matrix{Float64}:0.2031510.7181890.80144…-0.7193950.782568-0.6952710.40135-0.00942601-0.4838460.4901260.3509930.7104370.8931110.695784-0.35155-0.492186-0.51419-0.108983
julia> M =Sphere(2)
Sphere(2, ℝ)
julia>cost(p) =norm(Z.-p)
cost (generic function with 1 method)
julia>f(M,p) =cost(p)
f (generic function with 1 method)
julia>functiongrad_f(M,p)
X = Manifolds.gradient(M,cost,p,Manifolds.RiemannianProjectionBackend(ManifoldDiff.ReverseDiffBackend()))
println(norm(p), "", dot(p, X))
return X
end
grad_f (generic function with 1 method)
julia> p0 =rand(M)
3-element Vector{Float64}:0.48163366734648405-0.7087878160523022-0.5154113331060776
julia> z =gradient_descent(M,f, grad_f, p0)
0.99999999999999994.163336342344337e-160.99999999999999994.163336342344337e-160.99999999999999994.163336342344337e-160.99999999999999994.163336342344337e-161.0000000000000002-9.43689570931383e-161.0000000000000002-9.43689570931383e-161.0000000000000002-9.43689570931383e-161.0000000000000004-1.7208456881689926e-151.0000000000000004-1.7208456881689926e-151.0000000000000004-1.7208456881689926e-151.000000000000002-7.618905506490137e-151.000000000000002-7.618905506490137e-151.000000000000002-7.618905506490137e-151.0000000000000129-4.9758808184918735e-141.0000000000000129-4.9758808184918735e-141.0000000000000129-4.9758808184918735e-141.0000000000001046-4.0033254489202363e-131.0000000000001046-4.0033254489202363e-131.0000000000001046-4.0033254489202363e-131.000000000000906-3.453376473672165e-121.000000000000906-3.453376473672165e-121.000000000000906-3.453376473672165e-121.0000000000084301-3.207698689999816e-111.0000000000084301-3.207698689999816e-111.0000000000084301-3.207698689999816e-111.0000000000813305-3.0918282620555e-101.0000000000813305-3.0918282620555e-101.0000000000813305-3.0918282620555e-101.0000000007999785-3.0396521306930158e-91.0000000007999785-3.0396521306930158e-91.0000000007999785-3.0396521306930158e-91.0000000079532962-3.02114174231035e-81.0000000079532962-3.02114174231035e-81.0000000079532962-3.02114174231035e-81.0000000795470854-3.0211989330251876e-71.0000000795470854-3.0211989330251876e-71.0000000795470854-3.0211989330251876e-71.0000007983260109-3.031773524514751e-61.0000007983260109-3.031773524514751e-61.0000007983260109-3.031773524514751e-61.000008027466676-3.048456460556662e-51.000008027466676-3.048456460556662e-51.000008027466676-3.048456460556662e-51.00006733963745-0.000255746182292853071.00006733963745-0.000255746182292853071.00006733963745-0.000255746182292853071.0000673396374502-0.00025574618229360861.0000673396374502-0.00025574618229360861.0000673396374502-0.00025574618229360861.0000673396374502-0.00025574618229358611.0000673396374502-0.00025574618229358611.0000673396374502-0.00025574618229358611.0000673396374502-0.00025574618229357461.0000673396374502-0.00025574618229357461.0000673396374502-0.00025574618229357461.0000673396374502-0.00025574618229357461.0000673396374502-0.0002557461822935746
[...]
I think this would be a nice thing to document somewhere.
The text was updated successfully, but these errors were encountered:
A recent Slack discussion has an excellent example of catastrophic error accumulation on a sphere:
I think this would be a nice thing to document somewhere.
The text was updated successfully, but these errors were encountered: