lululxvi / deeponet

Learning nonlinear operators via DeepONet
Other
509 stars 139 forks source link

ImportError: cannot import name 'GRF' from 'spaces' (D:\miniconda3\lib\site-packages\spaces\__init__.py) #18

Open alexmav04 opened 2 years ago

alexmav04 commented 2 years ago

I have some problem while I run the code deeponet_ode.py:


ImportError Traceback (most recent call last) C:\Users\ALEXYA~1\AppData\Local\Temp/ipykernel_12048/4004186280.py in 9 10 import deepxde as dde ---> 11 from spaces import FinitePowerSeries, FiniteChebyshev, GRF 12 # from spaces import GRF 13 from system import LTSystem, ODESystem, DRSystem, CVCSystem, ADVDSystem

ImportError: cannot import name 'FinitePowerSeries' from 'spaces' (D:\miniconda3\lib\site-packages\spaces__init__.py)

I have run pip install spaces in the virtual environment, then I got this error. I check the file 'spaces__init__.py', there is nothing in the file. Is there anything I miss?


I found that is because the code run in the wrong folder. The module 'spaces' is actually involved in it. Sorry for the dumb question.

lululxvi commented 2 years ago

Here https://github.com/lululxvi/deeponet/blob/master/src/spaces.py