Commit f435e776 authored by Asim Shankar's avatar Asim Shankar Committed by TensorFlower Gardener
Browse files

Avoid adding spurious ops when colocating with resource variables.

Prior to this change, tf.colocate_with(v) would insert spurious operations (a ReadVariableOp and an Identity) in the graph when v is a resource variable, and then
colocate the operations within the block with those newly added, otherwise disconnected, operations.

This commit avoids adding the unnecessary ReadVariableOp/Identity nodes and colocates
operations within the block with the VarHandleOp.

PiperOrigin-RevId: 216201638
parent 411b9baa
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment