Comments (2)
since the data present in burgers_shock.mat
was generated using MATLAB, the initial and boundary condition are used to generate this data with the help of a suitable numerical method in MATLAB.
from pinns.
If you mean, where they are used in the neural network?
As far as I could make it by looking at the code, it uses the data implicitly to put bindings on the network.
Here is an example of it in the Schrodinger case:
In continuous time inference case, in the main function, we have the lower bound and upper bound of the region defined as:
lb = np.array([-5.0, 0.0])
ub = np.array([5.0, np.pi/2])
and we have
idx_t = np.random.choice(t.shape[0], N_b, replace=False)
tb = t[idx_t,:]
which is the sampling from those bounds. Moreover, the initial condition can be traced in
idx_x = np.random.choice(x.shape[0], N0, replace=False)
x0 = x[idx_x,:]
u0 = Exact_u[idx_x,0:1]
v0 = Exact_v[idx_x,0:1]
Now, if we look at the loss function, we can see this :
self.loss = tf.reduce_mean(tf.square(self.u0_tf - self.u0_pred)) + \
tf.reduce_mean(tf.square(self.v0_tf - self.v0_pred)) + \
tf.reduce_mean(tf.square(self.u_lb_pred - self.u_ub_pred)) + \
tf.reduce_mean(tf.square(self.v_lb_pred - self.v_ub_pred)) + \
tf.reduce_mean(tf.square(self.u_x_lb_pred - self.u_x_ub_pred)) + \
tf.reduce_mean(tf.square(self.v_x_lb_pred - self.v_x_ub_pred)) + \
tf.reduce_mean(tf.square(self.f_u_pred)) + \
tf.reduce_mean(tf.square(self.f_v_pred))
which is indicating that these samples from the lower bound and upper bound and the initial condition are also cooperating in the learning process of the network.
What happens is that the network tries to learn the data you provided for it, which also includes the data over the boundaries. Like so, the network will be forced to respect those conditions in some sense (of course, it treats them just like other data points and it would not be a strong condition since it has the same weight as the other losses. But it has its own impact. I believe one may try to associates some weights to those loss functions to adjust the importance of each of them.).
I would be happy that the community corrects me if I am wrong about it.
from pinns.
Related Issues (20)
- A problem about experiment settings
- can pytorch replace tensorflow HOT 1
- Try in tensorflow2.6 by myself. But had some problems. Hope get some help! HOT 6
- New reposit: a starting step for CFD specialists
- Physics Informed Neural Networks: a starting step for CFD specialists
- burgers equation PINN idea HOT 2
- Faster response HOT 2
- error on tf.contrib.opt.ScipyOptimizerInterface HOT 4
- Darcy's flow in multiscale porous media
- Failed to process string with tex because latex could not be found HOT 1
- some improvement need to run on tensorflow v2 HOT 5
- How to add the training data? HOT 1
- Data in the vorticity file HOT 1
- Is there any code about PINN using pytorch? Can you give me a link HOT 3
- Shrodinger's equation
- encountered 'ValueError: Mat 4 mopt wrong format, byteswapping problem?' in the 'cylinder_nektar_t0_vorticity.mat' file
- AttributeError: module 'tensorflow' has no attribute 'set_random_seed' HOT 8
- How do I represent random data for each value of x?
- solving pinn
- pinns solves the three-dimensional heat conduction equation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pinns.