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

Force NN to find u within an inter-range #19

Open
ciri1998 opened this issue Aug 7, 2024 · 1 comment
Open

Force NN to find u within an inter-range #19

ciri1998 opened this issue Aug 7, 2024 · 1 comment

Comments

@ciri1998
Copy link

ciri1998 commented Aug 7, 2024

Good morning, I was wondering if it would be possible to force the NN to find the solution within 0, 1 for u[0] and between 2 and 3 for u[1] for example

@benmoseley
Copy link
Owner

One way might be to use hard constraints - see here for an example: https://github.com/benmoseley/FBPINNs/blob/main/examples/2.%20Using%20hard%20constraints%20-%201D%20harmonic%20oscillator.ipynb
For example, if you want to restrict the solution to the range 0-1, you could pass the output of the network through a sigmoid function.

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

2 participants