tensorflow / tensorflow/probability
mcmc samples fill up memory
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 run Hamiltonian Monte Carlo on 4 copies of my model for 10^5 steps on a GPU.
Each copy of the model contains about 1000 parameters. The log-likelihood function contains tf.scan. The main (cpu) memory was quickly filled up.
Can I just get the value of the parameters that give the largest log-likelihood instead of the whole trace of samples?
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 by examining the Hamiltonian Monte Carlo sampling entry point and how it stores the trace when the log-likelihood uses tf.scan. Determine whether the requested behavior is to retain only the parameters associated with the largest log-likelihood, and define completion as bounded memory usage while preserving the best parameters.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- tensorflow
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100