GithubHelp home page GithubHelp logo

Comments (4)

mtthss avatar mtthss commented on August 15, 2024

Interesting, thanks for reaching out!
Let me see what the timeline would be to fix this in core jax itself

Just a note:
if you use Python's type checking or if you are using an IDE like PyCharm that supports Python type checking,
passing an int to adam would actually raise an error without even having to run the code

Since we explicitly type both the b1 and b2 arguments as float.

def scale_by_adam(b1: float = 0.9,
                  b2: float = 0.999,
                  eps: float = 1e-8,
                  eps_root: float = 0.0) -> GradientTransformation:

from optax.

mtthss avatar mtthss commented on August 15, 2024

A fix should have gone in in JAX

from optax.

dlsmith avatar dlsmith commented on August 15, 2024

Thanks for following up. Yea, I absolutely agree on the use of type checking, though it would be unfortunate if correctness relied on opting in to third party tooling, and in a case where assuming promotion semantics fails in a fairly subtle way. In any case, great that the fix came in so fast!

from optax.

mtthss avatar mtthss commented on August 15, 2024

Yep indeed they were quite quick!
Closing the issue since this should now be fixed

from optax.

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.