tensorflow / tensorflow/probability
transformedVariable compatibility with tensorFlow 2.4 and tensorflow_probability 0.12
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 4.4k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I have modified version of 'Gaussian Process Regression in TensorFlow Probability' from 'Guide & Tutorials'. This has been working with tensorFlow 2.3 and tensorflow_probability 0.11. Once upgraded to tensorFlow to 2.4 and tensorflow_probability 0.12, there are an issue with transformedVariable used for 'amplitude', 'lengthscale' and 'obsevation_variance' at the site-packages\tensorflow\python\eager\function.py with the function '_convert_numpy_inputs'. Since previously it doesn't force the transformedVariable to be numpy.ndarray but it does now. Hence it raises an error as below:
'The output of array must be an np.ndarray (got <class 'tensorflow.python.framework.ops.EagerTensor'> from <class 'tensorflow_probability.python.util.deferred_tensor.TransformedVariable'>).'
How could this be fixed?
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 reproducing the modified Gaussian Process Regression example from the Guide & Tutorials with TensorFlow 2.4 and tensorflow_probability 0.12, then inspect the transformedVariable path and TensorFlow's site-packages\tensorflow\python\eager\function.py _convert_numpy_inputs function. Done means the example runs without the reported TransformedVariable-to-numpy error under the upgraded versions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, tensorflow
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100