Skip to content

New loss #937

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 35 commits into from
May 20, 2025
Merged

New loss #937

merged 35 commits into from
May 20, 2025

Conversation

AstitvaAggarwal
Copy link
Contributor

@AstitvaAggarwal AstitvaAggarwal commented Apr 13, 2025

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

tutorial on how to use newloss and updated PINO must be added in a New PR

@AstitvaAggarwal AstitvaAggarwal changed the title Complete Constrained PINNS, BPINNs. New loss Apr 14, 2025
@AstitvaAggarwal
Copy link
Contributor Author

@ChrisRackauckas i think there are some compat issues in the Downgrade Test env.

@ChrisRackauckas
Copy link
Member

Yes don't worry about downgrade

@AstitvaAggarwal
Copy link
Contributor Author

AstitvaAggarwal commented May 5, 2025

@ChrisRackauckas the following PR adds the new loss for NNODE and BNNODE (with appropriate tests) and corrects tests erroring out in BPINN_PDE_tests.jl (this started once the repo was completely overhauled). Just to give some insight, BPINN model performance for just 20 training points in t=(0,4) as in the tests added where we solve LV :
image

u2 is our new model.

@AstitvaAggarwal
Copy link
Contributor Author

@ChrisRackauckas GTM?

@@ -6,7 +6,7 @@
dataset <: Union{Vector{Nothing}, Vector{<:Vector{<:AbstractFloat}}}
priors <: Vector{<:Distribution}
phystd::Vector{Float64}
phynewstd::Vector{Float64}
phynewstd::Function
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specialize?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im not sure how we can specialize functions...
(Im keeping a function for std in BPINNs as selecting the right std can be tricky and usually depends on the problem)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

::F will

@ChrisRackauckas
Copy link
Member

https://buildkite.com/julialang/neuralpde-dot-jl/builds/3061#0196dabe-a6b6-4fe1-8302-ad9274428bb8/1357-3261 docs have a failure.

@@ -44,6 +49,7 @@ standard `ODEProblem`.
* `strategy`: The training strategy used to choose the points for the evaluations.
Default of `nothing` means that `QuadratureTraining` with QuadGK is used if no
`dt` is given, and `GridTraining` is used with `dt` if given.
* `estim_collocate`: A boolean value to indicate whether to use the new loss function or not. This is only relevant for ODE parameter estimation.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need a more descriptive name than "the new loss function" lol

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will change that, im trying to be lowkey as it's all open source haha

@ChrisRackauckas
Copy link
Member

The BPINN tests need some tweaking. But this looks fine. Follow up with doc improvements.

@ChrisRackauckas ChrisRackauckas merged commit 152ded4 into SciML:master May 20, 2025
39 of 60 checks passed
@AstitvaAggarwal
Copy link
Contributor Author

Do you mean the BPINN pde solvers tests? Ive actually corrected the tests as previously tests were erroring out (ever since the overhaul format), now I'll fix the failures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants