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

Problem in plotting in Poisson tutorial on colab #393

Open
accdavlo opened this issue Dec 27, 2024 · 0 comments
Open

Problem in plotting in Poisson tutorial on colab #393

accdavlo opened this issue Dec 27, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@accdavlo
Copy link

Describe the bug
The tutorial on Poisson does not produce a plot on Google colab.

Commitment
I was trying to run the code to have a simple PINN for a class, I'm not thinking to debug the code. I thank you in advance if you will debug it.

To Reproduce
https://colab.research.google.com/github/mathLab/PINA/blob/master/tutorials/tutorial2/tutorial.ipynb at the first plot cell.

Bug
I get this error
ValueError: only one element tensors can be converted to Python scalars
when running the tutorial on Poisson on google colab https://mathlab.github.io/PINA/_rst/tutorials/tutorial2/tutorial.html

Complete Error

ValueError                                Traceback (most recent call last)
[<ipython-input-4-da1f560dd1b4>](https://localhost:8080/#) in <cell line: 2>()
      1 plotter = Plotter()
----> 2 plotter.plot(solver=pinn)

13 frames
[/usr/local/lib/python3.10/dist-packages/torch/_tensor.py](https://localhost:8080/#) in __torch_function__(cls, func, types, args, kwargs)
   1510 
   1511         with _C.DisableTorchFunctionSubclass():
-> 1512             ret = func(*args, **kwargs)
   1513             if func in get_default_nowrap_functions():
   1514                 return ret

ValueError: only one element tensors can be converted to Python scalars```
@accdavlo accdavlo added the bug Something isn't working label Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant