mathLab / PINA

Physics-Informed Neural networks for Advanced modeling
https://mathlab.github.io/PINA/
MIT License
395 stars 66 forks source link

Google colab some library is not showing #339

Open ramaPatel01 opened 2 months ago

ramaPatel01 commented 2 months ago

import torch from pina.problem import TimeDependentProblem, SpatialProblem from pina.operators import grad from pina import Condition from pina.span import Span from pina import LabelTensor import pandas as pd from scipy.io import savemat import os import random import numpy as np


ModuleNotFoundError Traceback (most recent call last) in <cell line: 5>() 3 from pina.operators import grad 4 from pina import Condition ----> 5 from pina.span import Span 6 from pina import LabelTensor 7 import pandas as pd

ModuleNotFoundError: No module named 'pina.span'

similar error with Solver PINN "ImportError Traceback (most recent call last) in <cell line: 4>() 2 import torch 3 from torch.nn import Softplus ----> 4 from pina import PINN, Plotter, LabelTensor 5 from pina.model import FeedForward 6 from problems.burgers_with_data import Burgers1D

ImportError: cannot import name 'PINN' from 'pina' (/usr/local/lib/python3.10/dist-packages/pina/init.py)"

dario-coscia commented 2 months ago

Hi @ramaPatel01 ! Can you provide the way you installed PINA on Colab?

I think you are using a very old version of PINA, can you also provided the version number (just run
python -c "import pina; print(pina.__version__)" from bash).