tensorflow / tensorflow/probability
DenseVariational Layer does not support sparse tensor
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 am trying to do prob regression on a sparse tensor input with the code as
https://www.tensorflow.org/probability/examples/Probabilistic_Layers_Regression#case_3_epistemic_uncertainty
However the error come up.
The error is saying matmul is not supported for sparse tensor. Looks like the matmul is used in DenseVariational layer
After I change the matmul to sparse_dense_matmul in the dense_variational_v2.py file, it works perfectly.
Wish this issue can be solved in next release
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 dense_variational_v2.py and reproduce the failure using the TensorFlow Probability probabilistic layers regression example, specifically the epistemic uncertainty case. Inspect the matmul path used by DenseVariational with a sparse tensor input. Done means the example runs successfully without requiring a user-local change to sparse_dense_matmul.
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
- 45/100