-
-
Notifications
You must be signed in to change notification settings - Fork 200
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
Docs modifications to use QuadratureTraining instead of GridTraining #729
Changes from all commits
b179412
70609cc
e1996c6
b41c094
98638a5
d2bd11a
136d52f
aa87003
87433bc
60218bc
ce0bd7d
7837d10
5e20ed1
99c7384
1009bff
6420f0d
ffd2514
1cdd5d5
444af19
3f63ab0
54dd7ee
fab3ced
bf06750
037bffe
5fc60b5
c25a0ee
278beab
2cabddf
99a5862
cae3107
ecda132
c5ef920
75505e6
b43c531
1cd1c64
1d3553a
183dca0
0ac0714
71d9127
faa0b8f
a56f960
346e863
5ac7676
dfec9e6
5bb907b
f2b57c0
d3f3d87
ba4b624
e755bc6
40faafa
1813449
c95323c
cd3e8b0
87a1cf8
09f84ff
54f5917
8f3252a
c5f7a1b
d3ca8b3
b133d83
a626cad
3db9f82
5cbc0ec
486b876
cd6ceab
bd20f19
2b172bf
947dd0a
c26e000
45dd116
9fc1561
70917e2
bfa76c4
8b53efd
1adf3e8
64aafa0
6af3bb0
8fc955d
b46e478
98bda3c
6db19cb
4c0732b
dc4c02f
a065b8b
1ecf50e
1362f18
e62d6dc
47994c9
a93f23b
db6f4b4
ef814f1
3cee89d
597f08f
7264aab
6569a4e
61f1e86
cc6e9c1
894a4b5
87aa3e4
0a97d60
352e3e8
4b4a77c
9f78a3a
652f8f4
6bb3df3
7a8f4b5
b46c211
647aae0
613228b
9329a4b
03be17c
d2ceedd
e05ed86
726cdb0
ffcb277
c5daa60
4ba95ad
464b82c
2b5a211
186e326
9a1f9aa
f22481d
e735c84
63de20d
9a94743
d4786c7
9c38687
ba58a2a
70c7175
345067a
ab5700f
37d5e34
da7f26f
324ae46
5ca7d77
7831268
790ac82
e6f588e
aa39260
61a3c6e
c9ab921
3560a97
0528d75
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,7 +58,7 @@ u0 = [1.0; 0.0; 0.0] | |
tspan = (0.0, 1.0) | ||
prob = ODEProblem(lorenz!, u0, tspan) | ||
sol = solve(prob, Tsit5(), dt = 0.1) | ||
ts = [infimum(d.domain):dt:supremum(d.domain) for d in domains][1] | ||
ts = [infimum(d.domain):0.01:supremum(d.domain) for d in domains][1] | ||
function getData(sol) | ||
data = [] | ||
us = hcat(sol(ts).u...) | ||
|
@@ -113,7 +113,7 @@ Then finally defining and optimizing using the `PhysicsInformedNN` interface. | |
|
||
```@example param_estim | ||
discretization = NeuralPDE.PhysicsInformedNN([chain1, chain2, chain3], | ||
NeuralPDE.GridTraining(dt), param_estim = true, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. dt is still defined? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems to be used in other places in this file, thats why I didnt remove it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. but it's not required when changing to QuadratureTraining. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, it can be removed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok I think I have fixed this one |
||
NeuralPDE.QuadratureTraining(), param_estim = true, | ||
additional_loss = additional_loss) | ||
@named pde_system = PDESystem(eqs, bcs, domains, [t], [x(t), y(t), z(t)], [σ_, ρ, β], | ||
defaults = Dict([p .=> 1.0 for p in [σ_, ρ, β]])) | ||
|
@@ -130,7 +130,7 @@ And then finally some analysis by plotting. | |
|
||
```@example param_estim | ||
minimizers = [res.u.depvar[depvars[i]] for i in 1:3] | ||
ts = [infimum(d.domain):(dt / 10):supremum(d.domain) for d in domains][1] | ||
ts = [infimum(d.domain):(0.001):supremum(d.domain) for d in domains][1] | ||
u_predict = [[discretization.phi[i]([t], minimizers[i])[1] for t in ts] for i in 1:3] | ||
plot(sol) | ||
plot!(ts, u_predict, label = ["x(t)" "y(t)" "z(t)"]) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dx is still defined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as dt from the other file, it seems to be used in other places in this file, thats why I didnt remove it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But none of this file should be using it anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I removed the instances of dx but it seems like the program is still creating a grid of some kind (see line 61 and below), maybe only for evaluation. I am assuming I don't want to delete all that stuff?