Modifying the iteration number of BFGS after using ADAM


We are trying to use ADAM 1st and then switch to BFGS for the optimizer, as suggested here:

We tried and it work but it seems that BFGS is hard-coded to run only 1000 iterations.
May I know how can we change it?


Hi @tsltaywb

You should be able to update the iterations BFGS uses via the max_iter config option in your config. See Hydra options here. So you should have something like the following in your config.yaml:

     max_iter: 123