Giter Site home page Giter Site logo

Comments (4)

patrick-kidger avatar patrick-kidger commented on July 18, 2024 1

@rtqichen fixed with the latest merge.

from torchdiffeq.

000Justin000 avatar 000Justin000 commented on July 18, 2024

I just found the same problem, LOL

from torchdiffeq.

rtqichen avatar rtqichen commented on July 18, 2024

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.

DrChainsaw avatar DrChainsaw commented on July 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.