Skip to content

Physics Informed Point Net#875

Open
ka-bear wants to merge 6 commits intoSciML:masterfrom
ka-bear:issue-#495
Open

Physics Informed Point Net#875
ka-bear wants to merge 6 commits intoSciML:masterfrom
ka-bear:issue-#495

Conversation

@ka-bear
Copy link
Copy Markdown

@ka-bear ka-bear commented Jul 10, 2024

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

Additional context

Added PIPNs to NeuralPDE
Fixes: #495

@sathvikbhagavan sathvikbhagavan changed the title Issue #495 Physics Informed Point Net Jul 16, 2024
Comment thread src/pinn_types.jl Outdated
Comment thread test/runtests.jl
end
end

if GROUP == "All" || GROUP == "PIPN"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The .github/workflows/ci.yml needs to add a PIPN group as well for this to run.

@ChrisRackauckas
Copy link
Copy Markdown
Member

Looks almost good to go! Left a few comments.

@ChrisRackauckas
Copy link
Copy Markdown
Member

Rebase

@sathvikbhagavan
Copy link
Copy Markdown
Member

Thanks! I will take a look as well in a couple of days.

ka-bear and others added 5 commits September 3, 2024 05:51
Comment thread src/NeuralPDE.jl
$(DocStringExtensions.README)
"""
module NeuralPDE
module NeuralPDE
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
module NeuralPDE
module NeuralPDE

Comment thread src/NeuralPDE.jl
include("dgm.jl")

export NNODE, NNDAE,
export NNODE, PIPN, init_pipn_params, NNDAE,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
export NNODE, PIPN, init_pipn_params, NNDAE,
export NNODE, PIPN, init_pipn_params, NNDAE,

Comment thread src/pinn_types.jl
???
"""
struct LogOptions
struct LogOptions
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
struct LogOptions
struct LogOptions

Comment thread src/pinn_types.jl
Comment on lines +560 to +561


Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change

Comment thread src/pinn_types.jl

## Positional Arguments

* `chain`: a Lux chain specifying the overall network architecture. The input and output dimensions
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this even needed as shared mlps are constructed inside?

Comment thread src/pinn_types.jl
global_feature_repeated = repeat(global_feature, 1, size(point_features, 2))
combined_features = vcat(point_features, global_feature_repeated)
combined_features, st3 = Lux.apply(model.after_pool_mlp, combined_features, ps.after_pool_mlp, st.after_pool_mlp)
output, st4 = Lux.apply(model.final_layer, combined_features, ps.final_layer, st.final_layer)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Doesn't the original architecture also have another block of shared mlps?

Comment thread src/pinn_types.jl
flat_ps = ComponentArray(ps)
new_flat_ps = typeof(flat_ps)(θ)
return ComponentArray(new_flat_ps)
end No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
end
end

Comment thread test/runtests.jl
@@ -1,4 +1,4 @@
using Pkg
using Pkg
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
using Pkg
using Pkg

Comment thread test/test_pipn.jl

@test prob isa OptimizationProblem
end
end No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
end
end

Comment thread test/test_pipn.jl
strategy = GridTraining(0.1)
discretization = PhysicsInformedNN(chain, strategy)

prob = discretize(pde_system, discretization)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is it working with solve?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yes, it should work

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ok, cool. Can you add it to the test and also address other comments?

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.

Physics-informed pointnet

3 participants