tensorflow / tensorflow/probability
Where exactly are the KL losses used after the forward pass?
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 4.4k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
I've noticed that the KL part of the loss is added to the list self._losses of the Layer class when self.add_loss is called from the call method of the DenseVariational (i.e. during the forward pass).
But how is this list self._losses (or the method losses of the same Layer class) treated during training? Where is it called from during training?
I would like to know how exactly these losses are combined with the loss that you specify in the fit method. Can you provide me to the code that combines them?
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 with keras/engine/base_layer.py at Layer._losses and the DenseVariational.call implementation in tensorflow_probability/python/layers/dense_variational.py. Trace the training entry point used by fit and identify where Layer.losses is combined with the user-specified loss. Done means documenting those call paths and the combination behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100