Skip to content

Commit

Permalink
Merge branch 'fix-tests-manopt-update' into add-MvNormalMeanScalePrec…
Browse files Browse the repository at this point in the history
…ision
  • Loading branch information
Nimrais committed Oct 23, 2024
2 parents 7760a14 + b5f3b70 commit 82161b1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion test/manopt_setuptests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function (sc::StopWhenGradientNormLessNonAllocating)(mp, s, i)
return false
end

# Non allocating version of the same `ConstantStepsize` from `Manopt.jl`
# Non allocating version of the same `ConstantLength` from `Manopt.jl`
struct ConstantStepsizeNonAllocating{T} <: Stepsize
stepsize::T
end
Expand Down
8 changes: 4 additions & 4 deletions test/shifted_negative_numbers_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ end
b in (10.0, 5.0),
c in (1.0, 10.0, -1.0),
eps in (1e-4, 1e-5, 1e-8, 1e-10),
stepsize in (ConstantStepsize(0.1), ConstantStepsize(0.01), ConstantStepsize(0.001))
stepsize in (ConstantLength(0.1), ConstantLength(0.01), ConstantLength(0.001))

expected_q = -b / 2a
expected_minimum = c - b^2 / (4a)
Expand Down Expand Up @@ -232,11 +232,11 @@ end
obj = ManifoldGradientObjective(missing, grad_f!; evaluation=InplaceEvaluation())
dmp = DefaultManoptProblem(M, obj)
s = GradientDescentState(
M,
q;
M;
p = q,
stopping_criterion=StopWhenGradientNormLessNonAllocating(1e-8),
stepsize=ConstantStepsizeNonAllocating(0.1),
direction=IdentityUpdateRule(),
direction=Manopt.IdentityUpdateRule(),
retraction_method=default_retraction_method(M, typeof(q)),
X=zero_vector(M, q),
)
Expand Down
8 changes: 4 additions & 4 deletions test/shifted_positive_numbers_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ end
b in (-10.0, -5.0),
c in (1.0, 10.0, -1.0),
eps in (1e-4, 1e-5, 1e-8, 1e-10),
stepsize in (ConstantStepsize(0.1), ConstantStepsize(0.01), ConstantStepsize(0.001))
stepsize in (ConstantLength(0.1), ConstantLength(0.01), ConstantLength(0.001))

expected_q = -b / 2a
expected_minimum = c - b^2 / (4a)
Expand Down Expand Up @@ -231,11 +231,11 @@ end
obj = ManifoldGradientObjective(missing, grad_f!; evaluation=InplaceEvaluation())
dmp = DefaultManoptProblem(M, obj)
s = GradientDescentState(
M,
q;
M;
p = q,
stopping_criterion=StopWhenGradientNormLessNonAllocating(1e-8),
stepsize=ConstantStepsizeNonAllocating(0.1),
direction=IdentityUpdateRule(),
direction=Manopt.IdentityUpdateRule(),
retraction_method=default_retraction_method(M, typeof(q)),
X=zero_vector(M, q),
)
Expand Down
2 changes: 1 addition & 1 deletion test/single_point_manifold_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ end
b in (10.0, 5.0),
c in (1.0, 10.0, -1.0),
eps in (1e-4, 1e-5, 1e-8, 1e-10),
stepsize in (ConstantStepsize(0.1), ConstantStepsize(0.01), ConstantStepsize(0.001))
stepsize in (ConstantLength(0.1), ConstantLength(0.01), ConstantLength(0.001))

f(M, x) = (a .* x .^ 2 .+ b .* x .+ c)[1]
grad_f(M, x) = 2 .* a .* x .+ b
Expand Down

0 comments on commit 82161b1

Please sign in to comment.