Comments (4)
@rtqichen fixed with the latest merge.
from torchdiffeq.
I just found the same problem, LOL
from torchdiffeq.
Hmm yeah that would work temporarily. I didn't think too much about the effect of this on tuples, but maybe removing the elements where f(y0,t0) is returning 0 would make more sense. I'll keep this in mind, thanks for reporting it.
from torchdiffeq.
I also ran into the same issue when I wanted to see how batch norm with running mean and avg would work inside an OdeFunc. Not that I expected it to work well, but as it is now, this kills the model as the first step size evaluation inserts inf in the running mean and var.
d1 typically has a 0 tensor in it because one the the elements of the tuple is the time gradient (which is often zero as func does seldom depend on t).
Isn't the intention of the code to use max norm for d0, d1 and d2? From the reference document: "Do one function evaluation f(x0, y0) at the initial point. It is in any case needed for the first RK step. Then put d0 = ||y0|| and d1 = ||f(x0, y0)||, where the norm is that of (4.11)"?
If so, the statments
dn = tuple(...
can be replaced by
dn = max(...
while de-tuplifying the remaining code dealing with them.
Or maybe just switch "tuple" and "_norm" for mean norm instead which is what 4.11 above is (not that I think it matters much).
from torchdiffeq.
Related Issues (20)
- learn_physics.py is very bad.
- code for reproducing Fig. 8
- Making forward function different than backward function
- reuse solver object
- Integrate Forced Andronov-Hopf Bifurcation HOT 3
- Export to ONNX?
- Is func variable in odeint(func, y0, t) the derivative part of the ode?
- Initial Condition changes when calling the odeint_adjoint
- How to use the summary function for model description?
- How to work with control namely PID controller
- Why odeint sometimes provides a wrong solution? HOT 5
- Non uniform time step in example/ode_demo.py
- runtime of ode_demo.py using adjoint vs. not using it HOT 1
- underflow in dt nan HOT 4
- Typo in paper (?) HOT 1
- How to pass extra paramaters of func to odeint? HOT 2
- Bug: Memory Leaky with from torchdiffeq import odeint HOT 1
- Perform one integration step HOT 2
- Scipy LSODA for stiff ODE
- Question about the gradient of `odeint`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from torchdiffeq.