hahnec / torchimize

numerical optimization in pytorch
https://hahnec.github.io/torchimize/
GNU General Public License v3.0
130 stars 7 forks source link

An example to use LM optimizer #2

Closed sashahexe closed 1 year ago

sashahexe commented 1 year ago

Hi,

thank you for your library, I'd like to use the LM optimizer in my PINN which is set up as a class based on pytorch. Could you share some examples of the code where you use the LM as an optimizer?

Thanks again!

hahnec commented 1 year ago

Hi Sasha,

Yet I only implemented a Gauss Newton optimizer, which I tested for a simple toy training example:

https://github.com/hahnec/torchimize/blob/master/tests/unit_test_raw_fit.py

AtaraxiaZ commented 8 months ago

Hi,

I also want to use LM optimizer, but I don't know the relationship between lma_fun_single and a LM optimizer. Could you give an example on how to use lma_fun_single on a simple fully-connected neural network?

Thanks in advance.