forked from StudioInfinity/dyna3
Tighten the tolerances
This commit is contained in:
parent
bc17d71f4a
commit
b74cbf10c1
2 changed files with 3 additions and 3 deletions
|
@ -744,7 +744,7 @@ impl Assembly {
|
|||
|
||||
// look for a configuration with the given Gram matrix
|
||||
let Realization { result, history } = realize_gram(
|
||||
&problem, 1.0e-12, 0.5, 0.9, 1.1, 200, 110
|
||||
&problem, 1.0e-20, 0.5, 0.9, 1.1, 400, 110
|
||||
);
|
||||
|
||||
/* DEBUG */
|
||||
|
|
|
@ -414,7 +414,7 @@ pub fn realize_gram(
|
|||
let tol = scale_adjustment * scaled_tol;
|
||||
|
||||
// set up constants and variables related to minimizing the soft loss
|
||||
const GRAD_TOL: f64 = 1e-9;
|
||||
const GRAD_TOL: f64 = 1e-12;
|
||||
let mut grad_size = f64::INFINITY;
|
||||
let mut softness = 1.0;
|
||||
|
||||
|
@ -515,7 +515,7 @@ pub fn realize_gram(
|
|||
// if we're near a minimum of the total loss, but the hard loss still
|
||||
// isn't tolerably low, make the soft constraints softer
|
||||
const SOFTNESS_BACKOFF_THRESHOLD: f64 = 1e-6;
|
||||
const SOFTNESS_BACKOFF: f64 = 0.9;
|
||||
const SOFTNESS_BACKOFF: f64 = 0.95;
|
||||
if state.loss_hard >= tol && grad_size < softness * SOFTNESS_BACKOFF_THRESHOLD {
|
||||
softness *= SOFTNESS_BACKOFF;
|
||||
state = SearchState::from_config(gram, soft, softness, state.config);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue