Coder Social home page Coder Social logo

Comments (5)

changhoonhahn avatar changhoonhahn commented on June 17, 2024

When I tried replacing _hod with tfp.distributions.Normal I didn't run into any issues...

from dhod.

EiffL avatar EiffL commented on June 17, 2024

Ok, sorry it took me a while to get around to this, but I confirm you are not crazy, I can't get non-zero gradients with the relaxed Bernoulli. It is very likely an issue with some underflowing. I'll try to dig out my own implementation of the Gumbel-Softmax which was working perfectly fine. Maybe that'll point us to what is wrong here

from dhod.

EiffL avatar EiffL commented on June 17, 2024

hehehehehhehe:
image

So yeah the problem comes from underflows when the probability for Ncen drops too close to 0. I would say one simple workaround is to clip the probability to some p_min, once my brain has rebooted a little bit more might think of a cleverer solution.

I've added another demo notebook: https://github.com/DifferentiableUniverseInitiative/DHOD/blob/master/nb/dhod_centrals_gs.ipynb
This works as long as we don't sample too far away from Mmin, need to implement that clipping.

from dhod.

EiffL avatar EiffL commented on June 17, 2024

Sweet, closing this issue then

from dhod.

EiffL avatar EiffL commented on June 17, 2024

Before we forgetr.... @all-contributors, let's add @changhoonhahn for code

from dhod.

Related Issues (16)

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.