Skip to main content

optimise_with_progress

Function optimise_with_progress 

Source
pub fn optimise_with_progress(
    model: &mut Model,
    init: &[f32],
    options: &Options,
    on_step: &mut dyn FnMut(usize, usize) -> bool,
) -> Optimised
Expand description

optimise, calling on_step(done, total) after each step (the model render before the first takes about a sixth of the time). Returning false stops early with the best result so far.