tensorflow / tensorflow/probability
raise error if tfp.layers' kernel_prior/posterior aren't specified with correct shapes
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 4.4k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
A common user mistake is to specify the kernel_prior or kernel_posterior distribution without a matrix event shape. This makes the KL divergence computation incorrect as the KL must be over matrixvariate distributions. Let's catch this early on by checking during build().
Same applies to bias vector.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the tfp.layers build() implementations and trace how kernel_prior, kernel_posterior, and bias distributions are configured before KL divergence is computed. Add early validation for the required matrix and vector event shapes, then verify that incorrectly shaped distributions fail during build().
Written by the indexing model from the issue text.
Assessment
- Tech stack
- tensorflow
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100