ITMO-NSS-team / torch_DE_solver

Combines power of torch, numerical methods to conquer and solve ALL {O,P}DEs
https://torch-de-solver.readthedocs.io
BSD 3-Clause "New" or "Revised" License
59 stars 9 forks source link

Adaptive lambdas #32

Closed nikiniki1 closed 1 year ago

nikiniki1 commented 1 year ago

Realization of adaptive lambdas and dynamic loss function for boundary conditions.

SuperSashka commented 1 year ago

What we have done so far - we fully revamped adaprive lambdas routine such that it is computed using dispersion part directly with Sobol indices (one may refer to https://github.com/ITMO-NSS-team/torch_DE_solver/blob/adaptive_lambdas_sobol/examples/adaptive_disp_ODE.py and https://github.com/ITMO-NSS-team/torch_DE_solver/blob/adaptive_lambdas_sobol/examples/adaptive_disp_wave_eq.py examples with my experiments), not neural tangent kernel eigenvalues analogue. It is done since NTK does not work for anything exept single PDE - in NTK case we would have left ODE and systems out.

Secondly, we rework the loss - it is now computed in two faces - one with lambdas for gradient descent and one with normalized for stopping crtiterion. Even though it is a bit of pulls back everything - namely, training process is not quite connected with stop criterion - it would be benefit for parameter unification.

Additionally, we split Dirichlet and initial (we made a step further and split Dirichlet, operator, periodic) conditions in terms of lambda like big guys. Adaptive lambdas are also split.

I hope we making last second fixes and pull new shiny feautes asap.