tensorflow / tensorflow/probability
Getting error "AttributeError: 'RefVariable' object has no attribute '_id'" running TFP example
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 am running the DPMM example from the repository on Google Colab.
During running the optimizer step, I am getting the following error:
AttributeError Traceback (most recent call last)
AttributeError: 'RefVariable' object has no attribute '_id'
The above exception was the direct cause of the following exception:
SystemError Traceback (most recent call last)
<ipython-input-9-e863f37ccd7f> in <module>()
17 data_size=num_samples)
18
---> 19 train_op = optimizer_kernel.minimize(-joint_log_prob, var_list=training_vals)
20
21 # Arrays to store samples
3 frames
/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/eager/tape.py in watch(tape, tensor)
57 def watch(tape, tensor):
58 """Marks this tensor to be watched by the given tape."""
---> 59 pywrap_tensorflow.TFE_Py_TapeWatch(tape._tape, tensor) # pylint: disable=protected-access
60
61
SystemError: <built-in function TFE_Py_TapeWatch> returned a result with an error set
I am not able to figure out the cause of this. Kindly suggest a solution.
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 running the repository's DPMM example in Google Colab and reproduce the failure at optimizer_kernel.minimize(-joint_log_prob, var_list=training_vals). Inspect the traceback around the RefVariable '_id' error and the optimizer step. Done means the example completes that step without the reported AttributeError.
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
- Needs clarification
- Newbie friendliness
- 35/100