Giter VIP home page Giter VIP logo

Comments (5)

a0m0rajab avatar a0m0rajab commented on August 30, 2024 1

Thank you for the detailed answer, I will keep an eye on this and will try to find other issues to work on!

Meanwhile for the purpose of making this issue easier for future contributors, when the functions are ready. The functions in the body could be implemented in this file:
https://github.com/unifyai/ivy/blob/master/ivy/functional/frontends/torch/locally_disabling_gradient_computation.py
and the test could be written here:
https://github.com/unifyai/ivy/blob/master/ivy_tests/test_ivy/test_frontends/test_torch/test_locally_disabling_gradient_computation.py

from ivy.

a0m0rajab avatar a0m0rajab commented on August 30, 2024

For this task, I just want to make sure, should we have an experimental function first and then work on it?
I am thinking about this since this functions will change the whole behavior of the library:

from ivy.

AnnaTz avatar AnnaTz commented on August 30, 2024

For this task, I just want to make sure, should we have an experimental function first and then work on it? I am thinking about this since this functions will change the whole behavior of the library:

Hi @a0m0rajab, thanks for your interest in this task! However, this ToDo will be on hold until our torch frontend's Tensor class has been updated to be able to track gradients.

from ivy.

a0m0rajab avatar a0m0rajab commented on August 30, 2024

Hi @AnnaTz thank you for your fast response,
What updates will be happen there? is there an issue for that?
I would like to see if I can contribute on that part though.

from ivy.

AnnaTz avatar AnnaTz commented on August 30, 2024

What updates will be happen there? is there an issue for that?

Given that gradients in Ivy are functional, there isn't really a concept of enabling or disabling them globally, so we'll need to handle this behavior in the frontend. We plan on recording the functions called if requires_grad is set True in the frontend tensor and for computing gradients we'd just redo these operations in the function that we pass to ivy.execute_with_gradients. This is similar to how we deal with views in the torch frontend. The no_grad mode would simply prevent the functions called on a tensor from being recorded, and so on for the rest of the functions in this ToDo.

This requires implementing new methods/properties in the torch frontend's tensor class, as well as writing function decorators to enable the read/write operations on the recorded gradients.

Given that this is a complex task, we would have a dedicated engineer in our team take this on, rather than making this a public task.

from ivy.

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.