Closed Arup-nit closed 2 years ago
Also facing same problem for import Solver 2D and Monitor 2D. Thank you
Can you check your C:\Users\USER\anaconda3\lib\site-packages\neurodiffeq\solvers.py
file and see if it contains a Solver1D
class? This is likely a python environment issue specific to your local setup.
I update to latest version. I want to solve fourth order ODE, With both neumann and dirichlit conditions. for ex y(0)=1,y'(0)=2,y(1)=2,y'(1)=3 Can I solve using this package?
Dear Liu,
after update to latest version; my earlier code is not working for solving second order ode for DirichletBVP
train_generator = ExampleGenerator(N, t_min=0.1, t_max=2, method='uniform')
solution, loss_history, internals = solve(
ode=ode,
condition=condition,
t_min=x_1,
t_max=x_2,
optimizer=adam,
monitor=monitor,
max_epochs=5000,
return_internal=True,
train_generator=train_generator,
valid_generator=valid_generator,
batch_size=train_generator.size,
)
Giving error like
name 'adam' is not defined
If remove optimizer=adam
and run then giving below error
TqdmKeyError: "Unknown argument(s): {'colour': 'blue'}"
Please look into this
The error is because you did not define the variable adam
and python doesn't know that variable is. You need to try
adam = torch.optim.Adam(...)
before passing that to the solve
function.
On another note, the solve
function is deprecated long ago and you should stop using it because we'll stop supporting it in the future.
Thank you
Dear Liu, I am getting error when import solver and monitor.
from neurodiffeq.solvers import Solver1D
getting error like this ImportError: cannot import name 'Solver1D' from 'neurodiffeq.solvers' (C:\Users\USER\anaconda3\lib\site-packages\neurodiffeq\solvers.py)from neurodiffeq.monitors import Monitor1D
getting error like this ImportError: cannot import name 'Monitor1D' from 'neurodiffeq.monitors' (C:\Users\USER\anaconda3\lib\site-packages\neurodiffeq\monitors.py) pl fix it thank u