Skip to content

Getting error "AttributeError: 'RefVariable' object has no attribute '_id'" running TFP example #592

Open
@shashankg7

Description

@shashankg7

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions