pmelchior / scarlet2

Scarlet, all new and shiny
MIT License
14 stars 3 forks source link

New version of iteration dependence #29

Closed jaredcsiegel closed 9 months ago

jaredcsiegel commented 9 months ago

Iteration counting inside of scene is now replaced by having optax schedule as input parameter to scene.fit. Ex:

schedule = optax.cosine_onecycle_schedule( transition_steps=maxiter, peak_value=1, pct_start=0.5, div_factor=10, final_div_factor=.1)

scene.fit(obs, schedule, max_iter=max_iter, e_rel=e_rel)

if schedule = None (default) no schedule is used.

pmelchior commented 9 months ago

I like it. Did you check that it works?

jaredcsiegel commented 9 months ago

Yes, I've verified that changing the scheduler has the expected effect on the fits (such as setting the scheduler to very large steps at late iterations) and that setting the scheduler=None gives identical results to manually turning off the scheduler in scene.py