Skip to content
Discussion options

You must be logged in to vote

You can autodiff through histogram2d, but I believe the correct gradient for the counts in each bin is zero. The issue at play is similar to the one discussed in detail in this answer: #8977 (comment)

Regarding how to work around this: I seem to recall there are ways to estimate the KL divergence without binning your data. I can't remember any exact references, but that's where I would start in this case.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@pourion
Comment options

Answer selected by Peter-Vincent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants