mathLab / PINA

Physics-Informed Neural networks for Advanced modeling
https://mathlab.github.io/PINA/
MIT License
395 stars 66 forks source link

Optimizer and Scheduler #342

Open ndem0 opened 2 months ago

ndem0 commented 2 months ago
          I really like both `Optimizer` and `Scheduler` classes! I think the `hook` method can be made an abstract method for the base classes. In this way all the classes that inherit from those need to have this function (which is fundamental to attach the network parameters to optimize).

The only thing that I am concerned about is the back compatibility with Lightning, as by default Lightning will use built-in functions inherited from Torch Optimizers and Schedulers. Maybe in the base classes Optimizer and Scheduler we should inherit from torch base classes of optimizer and scheduler as well?

_Originally posted by @dario-coscia in https://github.com/mathLab/PINA/pull/312#discussion_r1730285717_