DiffEqML / torchdyn

A PyTorch library entirely dedicated to neural differential equations, implicit models and related numerical methods
https://torchdyn.org
Apache License 2.0
1.35k stars 125 forks source link

Model Hangs on First Epoch #124

Closed nprasadmm closed 2 years ago

nprasadmm commented 2 years ago

I created a Graph Neural ODE using torchdyn where f is a 2-layer GCN made from torch_geometric layers and the model seems to run forever on the first epoch. When I print the output in the forward function for f, I constantly print the same values without end. I am unsure of any possible reasons for this. Could it be that the solver is failing to converge? Where should I look to debug this issue? I would appreciate any help.

Zymrael commented 2 years ago

Sounds like the solver is stuck rejecting the step due to high local error estimation. Are you using an adaptive solver i.e dopri5 or tsit5? Does the issue persist with a fixed-step solver like rk4?

nprasadmm commented 2 years ago

I switched to rk4 and it worked! Thank you!