Code Monkey home page Code Monkey logo

Comments (5)

dsmilkov avatar dsmilkov commented on May 22, 2024 1

Let's take conv2d since it's very similar to depthwiseConv2d. Here are the lines that specify forward mode and gradients for conv2d. That op then uses 2 kernel/backend ops specified here.

DepthwiseConv2d is analogous but it's missing the gradients. You'd have to add depthwiseConv2dDerInput and depthwiseConv2DDerFilter to the backend. The math should be simpler than the conv2dDerInput and conv2dDerFilter. Hope this helps!

from tfjs.

carlthome avatar carlthome commented on May 22, 2024 1

Status on this? I'd really love to be able to calculate gradients for doing saliency maps.

from tfjs.

jaxball avatar jaxball commented on May 22, 2024

Is someone working on this? I'd like to get the gradients for MobileNet to perform finetuning in the browser and visualize features on the original image like Deepdream does.

After some digging through, I confirm the need for this ticket as part of my research and when I printed out filteredTape in Engine.prototype.gradients(), I also see some undefined layers interlaced between consecutive pairs of reshape ops (see pic). @nsthorat I see in #108 (comment) that the team is working on this, so I was wondering if I could be pointed somewhere.
screen shot 2018-04-19 at 9 43 42 pm

Also, this comment is a followup to #153. Nikhil you said

We don't have gradients defined for depthwise convs, so MobileNet gradients should have worked in the old way.

I'm not sure what you mean by the old way. If you're referring to getting the gradients, that's precisely what we want. How do you go about it?

from tfjs.

dsmilkov avatar dsmilkov commented on May 22, 2024

You need the gradients for depthwise conv in order to analyze MobileNet's gradients. We will add this early next week. Stay tuned. In the meantime if anyone else is interested in taking a stab at this, I'll be happy to review.

from tfjs.

jaxball avatar jaxball commented on May 22, 2024

Gotcha. If I wanted to take a quick jab at it, what are some files I should specifically look out for?
My project deadline is next week so I'd like to have it added by early next week. I'd love to help given some pointers!

Thanks,
Jason

from tfjs.

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.