File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -532,6 +532,23 @@ function trust_region_step!(cache::TrustRegionCache)
532
532
cache. internalnorm (g) < cache. ϵ
533
533
cache. force_stop = true
534
534
end
535
+ elseif radius_update_scheme === RadiusUpdateSchemes. Bastin
536
+ if r > cache. step_threshold
537
+ take_step! (cache)
538
+ cache. loss = cache. loss_new
539
+ cache. make_new_J = true
540
+ if retrospective_step! (cache) >= cache. expand_threshold
541
+ cache. trust_r = max (cache. p1 * cache. internalnorm (step_size), cache. trust_r)
542
+ end
543
+
544
+ else
545
+ cache. make_new_J = false
546
+ cache. trust_r *= cache. p2
547
+ cache. shrink_counter += 1
548
+ end
549
+ if iszero (cache. fu) || cache. internalnorm (cache. fu) < cache. abstol
550
+ cache. force_stop = true
551
+ end
535
552
end
536
553
end
537
554
You can’t perform that action at this time.
0 commit comments