tensorflow / tensorflow/probability

How is KL scaling taken into account -- DenseFlipout

Open
#1,526 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
4.4k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

Hello all,

for a paper I'm writing, I'm making use of the DenseFlipout layer. I'm reweighing the KL-loss as follows:
kl_divergence_function_output = (lambda q, p, _: tensorflow_probability.distributions.kl_divergence(q, p) / scale)
This results in a scaling factor between the KL-loss and the maximal likelihood loss. However in the original paper (https://arxiv.org/pdf/1505.05424.pdf), Equation 2 is comprised of 3 terms. I'm sure about the 2nd and 3rd term wether they are scaled with the scaling factor of the KL loss or not, however I was wondering about the first one and hoped to find my answer here.

Thanks in advance!
Cedric

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the DenseFlipout documentation and the KL-divergence callback shown in the issue, then compare its behavior with Equation 2 of the linked paper. Done means providing a documented, unambiguous explanation of which terms are affected by the scaling factor.

Written by the indexing model from the issue text.

Assessment

Domain
machine-learning
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.