Comments (5)
When I tried replacing _hod
with tfp.distributions.Normal
I didn't run into any issues...
from dhod.
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.
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.
Sweet, closing this issue then
from dhod.
Before we forgetr.... @all-contributors, let's add @changhoonhahn for code
from dhod.
Related Issues (16)
- Implementation of NFW radial distribution HOT 13
- Adding contributions HOT 7
- Remove heavy TF model from git history HOT 1
- Implement and sample from Zheng2007 HOT 2
- Improve the README
- Add caching to GitHub CI HOT 1
- Proper inference of HOD parameters HOT 1
- Optimize HOD parameters to fit power spectrum HOT 1
- Compute a CIC density field from galaxy catalog HOT 7
- Implement a differentiable correlation function
- Make all sampling functions batch capable HOT 4
- Adding missing contributors HOT 6
- New versions of TFP cause NaN gradients for RelaxedBernoulli near p=0 and p=1 HOT 3
- Set default values for Zheng07 params to halotools values HOT 1
- Why not sampling all the things? HMC sampling of each individual galaxy activation HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dhod.