Skip to content

Commit ace1dfb

Browse files
patch bfgs upper bound compute squared norm (#399)
1 parent 5c4bb06 commit ace1dfb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/lbfgs.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,10 +228,10 @@ function push_common!(
228228

229229
# Update arrays a and b used in forward products.
230230
if !op.inverse
231-
data.opnorm_upper_bound -= data.norm_b[insert]
231+
data.opnorm_upper_bound -= data.norm_b[insert]^2
232232
data.b[insert] .= y ./ sqrt(ys)
233233
data.norm_b[insert] = norm(data.b[insert])
234-
data.opnorm_upper_bound += data.norm_b[insert]
234+
data.opnorm_upper_bound += data.norm_b[insert]^2
235235

236236
@inbounds for i = 1:(data.mem)
237237
k = mod(insert + i - 1, data.mem) + 1

0 commit comments

Comments
 (0)