Skip to content

Commit d517367

Browse files
committed
Norm has been fixed upstream
1 parent 93f0954 commit d517367

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/broyden.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ function perform_step!(cache::GeneralBroydenCache{iip, IJ, UR}) where {iip, IJ,
175175
ifelse(iszero(denom), T(1e-5), denom)
176176
@bb cache.J⁻¹ += vec(cache.du) × transpose(_vec(cache.u_cache))
177177
elseif UR === :bad_broyden
178-
dfu_norm = norm(cache.dfu)^2
178+
dfu_norm = cache.internalnorm(cache.dfu)^2
179179
@bb @. cache.du = (cache.du - cache.J⁻¹dfu) /
180180
ifelse(iszero(dfu_norm), T(1e-5), dfu_norm)
181181
@bb cache.J⁻¹ += vec(cache.du) × transpose(_vec(cache.dfu))

src/trustRegion.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,6 @@ function __reinit_internal!(cache::TrustRegionCache; kwargs...)
582582
return nothing
583583
end
584584

585-
# This only holds for 2-norm?
586585
__trust_region_loss(cache::TrustRegionCache, x) = __trust_region_loss(cache.internalnorm, x)
587586
__trust_region_loss(nf::F, x) where {F} = nf(x)^2 / 2
588587

0 commit comments

Comments
 (0)