File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -437,12 +437,12 @@ function trust_region_step!(cache::TrustRegionCache)
437
437
end
438
438
439
439
# trust region update
440
- if r < cache . shrink_threshold # default 1 // 10
441
- cache. trust_r *= cache . shrink_factor # default 1 // 2
442
- elseif r >= cache . expand_threshold # default 9 // 10
443
- cache. trust_r = cache . expand_factor * norm (cache. du) # default 2
444
- elseif r >= cache . p1 # default 1 // 2
445
- cache. trust_r = max (cache. trust_r, cache. expand_factor * norm (cache. du))
440
+ if r < 1 // 10 # cache.shrink_threshold
441
+ cache. trust_r *= 1 // 2 # cache.shrink_factor
442
+ elseif r >= 9 // 10 # cache.expand_threshold
443
+ cache. trust_r = 2 * norm (cache. du) # cache.expand_factor * norm(cache.du)
444
+ elseif r >= 1 // 2 # cache.p1
445
+ cache. trust_r = max (cache. trust_r, 2 * norm (cache . du)) # cache.expand_factor * norm(cache.du))
446
446
end
447
447
448
448
# convergence test
You can’t perform that action at this time.
0 commit comments