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

Problems using PINNs #1

Closed
neumannoskar opened this issue Aug 4, 2022 · 7 comments
Closed

Problems using PINNs #1

neumannoskar opened this issue Aug 4, 2022 · 7 comments

Comments

@neumannoskar
Copy link

neumannoskar commented Aug 4, 2022

I've tried to use the example for the logistic_equation_1d.py . It produces following error

line 94, in train_model
loss_evolution.append(loss.detach().numpy())
RuntimeError: Numpy is not available

I'm using Python 3.10.4.

Thank's for any help.

@fabioantonini
Copy link

fabioantonini commented Aug 4, 2022

Hi
I guess you need to install the package 'numpy' in your python environment.
Take a look at the following link
Hope this helps

@neumannoskar
Copy link
Author

neumannoskar commented Aug 4, 2022

Hey, thank's for the quick reply. That's is not the problem, since the script logistic_equation_1d.py would produce an error earlier when trying to import numpy in line 7.

So the package 'numpy' is definitely installed.

@fabioantonini
Copy link

fabioantonini commented Aug 4, 2022 via email

@neumannoskar
Copy link
Author

I found this post already, but unfortunately this version of torch is not available anymore. Trying to downgrade produces:

ERROR: Could not find a version that satisfies the requirement torch==0.9.1 (from versions: 1.11.0, 1.12.0)
ERROR: No matching distribution found for torch==0.9.1

@madagra
Copy link
Owner

madagra commented Aug 4, 2022

Hello,

I pinned the version in the requirements.txt file, but it is unnecessary. You can try to install the dependencies manually yourself in a virtual environment:

python -m venv .env
source .env/bin/activate
pip install numpy torch matplotlib

Try then to execute the code again.

@fabioantonini
Copy link

fabioantonini commented Oct 11, 2022 via email

@madagra
Copy link
Owner

madagra commented Jul 9, 2023

I am going to close this issue since I assume the problem has been solved with the two comments above.

@madagra madagra closed this as completed Jul 9, 2023
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

3 participants