Skip to content

Commit 3aad80c

Browse files
authored
Update blended_cg.jl (#561)
In case the direction is 0.0, \eta stay infinite.
1 parent a5e15f8 commit 3aad80c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/blended_cg.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,7 @@ function simplex_gradient_descent_over_convex_hull(
972972
end
973973
# TODO at some point avoid materializing both x and y
974974
x = copy(active_set.x)
975-
η = max(0, η)
975+
η = isfinite(η) ? max(0, η) : 0
976976
@. active_set.weights -= η * d
977977
y = copy(compute_active_set_iterate!(active_set))
978978
number_of_steps += 1

0 commit comments

Comments
 (0)