Giter VIP home page Giter VIP logo

Comments (4)

sschoenholz avatar sschoenholz commented on June 30, 2024

Hi @DarrenZhang01, I'm happy to take this one. The idea here is that during computation of the kernel, we would like to know the shape of the intermediate (pre-)activations in the finite version of the computation. To do this, we use JAX's abstract evaluation machinery to infer the shapes using the init_fn without actually instantiating any parameters. Here akey is an abstract version of key that retains only shape and dtype information. If you want to know more, you might want to check out one of the JAX talks (there is a great one by Skye that's recorded somewhere) where they explain how tracing works.

from neural-tangents.

DarrenZhang01 avatar DarrenZhang01 commented on June 30, 2024

Thanks very much Sam @sschoenholz ! I see that akey is an abstract level (ShapedArray) of key representation. If I understand correctly, when akey serves as the input for abstract_eval_fun in _propagate_shape, it is only used as a PartialVal object in generating the Jaxpr?

from neural-tangents.

sschoenholz avatar sschoenholz commented on June 30, 2024

I think that's basically correct. As a technical point, I believe JAX doesn't instantiate the jaxpr explicitly, but evaluates the shape while tracing the jaxpr.

from neural-tangents.

DarrenZhang01 avatar DarrenZhang01 commented on June 30, 2024

I see. Thanks, Sam!

from neural-tangents.

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.