Skip to content
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

Intermediate Steps Included for Computation #35

Closed
sumantkrsoni opened this issue May 2, 2020 · 18 comments
Closed

Intermediate Steps Included for Computation #35

sumantkrsoni opened this issue May 2, 2020 · 18 comments

Comments

@sumantkrsoni
Copy link

I want to know about the intermediate steps included for computing PDE using DeepXDE.

  • how the forward pass is taking place in DEEPXDE. I mean all collocation points over domain and boundary points have been chosen simultaneously for learning-purpose or only a batch of training points have been chosen.

  • Backward pass invoked after completely exhausting the training points or after every single point backward pass has been invoked.

@lululxvi
Copy link
Owner

lululxvi commented May 2, 2020

  • All collocation points over domain and boundary points have been chosen simultaneously for learning-purpose
  • Backward pass invoked after completely exhausting the training points.

@sumantkrsoni
Copy link
Author

Thanks Lu,

  • During Backward pass, how did you deal with the term of gradients wrt input value.
    I mean, only once the backward pass has been taken care and during gradient calculation of cost function wrt parameters (during back pass) would definitely include gradient of cost fn wrt input variable , then which input variable has been taken care for single back pass.

I am confused at this place because all training points have been exhausted in single forward pass and Only once the backward pass has been taken for parameters update then which input value will be playing a role for calculating gradients of cost function.

@lululxvi
Copy link
Owner

lululxvi commented May 3, 2020

There are two gradients to be computed: the gradient of loss wrt weights, and the gradient of network output wrt network inputs. The second gradient is computed by calling tf.gradient(). You may check the details of computing the total losses here:

def losses(self, targets, outputs, loss, model):

Hope this helps.

@sumantkrsoni
Copy link
Author

Thanks, lu, you have cleared my doubts,

kindly give some reference for scaling a physical problem,

I mean, while coding in DeepXDE, one module is dedicated for SCALING of output value.

Can you suggest or give some reference for calculating the scale of a problem.

bcz, while simulation, the output result totally changing when the parameter of scale values are changing drastically.

@lululxvi
Copy link
Owner

lululxvi commented May 3, 2020

The scaling usually requires the understanding of the PDE, e.g., what physical process the PDE describes. Or one can use dimensional analysis.

Yes, the PDE solution could totally change when the parameters are changed, so the understanding of the PDE is very useful.

@sumantkrsoni
Copy link
Author

You mean Non-Dimensionalization process and dimensional analysis etc.

Do you have any numerically calculated value for a simple problem that fulfill the scale analysis requirement in DEEPXDE.

I mean how final scale values are coming. It may help me a lot if you can give me reference or any example.

Thanks

@lululxvi
Copy link
Owner

lululxvi commented May 3, 2020

Sorry I don't have any reference. DeepXDE does not have specific requirement for this. The only reason is that if the scale is too large or too small, the network optimization is hard. The solution is problem dependent. If you have any specific problem, we can discuss case by case.

@sumantkrsoni
Copy link
Author

sumantkrsoni commented May 3, 2020 via email

@Rajat735
Copy link

Hey , SanjuSoni
I have some doubts regardiing how to use boundary conditions when outputs are more than one?

@sumantkrsoni
Copy link
Author

I am not getting your point

  • r u asking about computation point of view
    OR
  • Coding point of view

@Rajat735
Copy link

Coding point of view. I have doubt in neumann condition i.e if the condition is directly not on the independent variable y .
Suppose in piezoelectric cantilever beam, the neumann condition is not on displacement but on stress. I have pde on displacement and voltage as independent variable with rectangular geometry

@Rajat735
Copy link

image

@smao-astro
Copy link
Contributor

Hi @Rajat735 , I am wondering are you talking about coupled PDE problems, or you want to implement a specific boundary condition other than DirichletBC and NeumannBC? Would the example: examples/Lorenz_inverse.py help?

@Rajat735
Copy link

Yes, I am talking about coupled PDE which i have to solve using machine learning. In this I have a boundary condition on the right surface of the cantilever beam as normal derivative of stress is equal to traction force . I am stuck in implementing this boundary condition.

@smao-astro
Copy link
Contributor

Yes, I am talking about coupled PDE which i have to solve using machine learning. In this I have a boundary condition on the right surface of the cantilever beam as normal derivative of stress is equal to traction force . I am stuck in implementing this boundary condition.

Sorry I do not know the exact form of your boundary condition, just a hint: since this is coupled PDE problem, which means let's say you have 4 unknowns, you perhaps want to specify the boundary conditions for each unknowns using component keyword argument. See class BC for how to use it.

@Rajat735
Copy link

I can share the problem along with the code. May you help with it?

@lululxvi
Copy link
Owner

lululxvi commented May 17, 2020

@Rajat735 @smao-astro @sanjusoni Let us continue the discussion at #31

@sumantkrsoni
Copy link
Author

It sounds good that @lululxvi @smao-astro who is profound in this field, acting on this problem.
I am also learning this type of problem.

Thanks @lululxvi @smao-astro

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

No branches or pull requests

4 participants