-
Notifications
You must be signed in to change notification settings - Fork 741
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
What is target in the losses function? #358
Comments
It seems that the answer is buried in the data/pde.py where losses function is defined. error_f and error on the boundary give the residual vector and the difference on the boundary. But why the size of the tensor in the inputs seems the num_domain+ 2*num_doundary? def losses(self, targets, outputs, loss, model): |
The points on the boundary are used twice: once of the PDE residual, and one for the boundary loss. see #39 |
Thanks! I have another question. Are the training points randomly chosen at each iteration when using L-BFGS or Adam? If not, how could I modify the code to randomly sampling training data in the domain? |
You can use |
Thank you very much for your reply, I have got what I want. |
Hello, thanks for your wonderful code, especially the efforts for PyTorch!
What is the variable "target" in the "losses" function? I tested the Possion_Lshape.py and print the "targets" in the losses function and I found that it is always None. So, how does the target plays in the losses? If I want the residual not the loss, i.e., the vector of [residualPDE, boundary_difference], how can I modify the code?
Thanks again!
The text was updated successfully, but these errors were encountered: