Commit 60740a48 authored by A. Unique TensorFlower's avatar A. Unique TensorFlower Committed by TensorFlower Gardener
Browse files

Eliminate the creation of unnecessary read ops when working with ResourceVariables.

In particular:
1. Don't create additional read ops when creating a ResourceVariable from a VariableDef proto.
2. Expose the ability to assign a ResourceVariable without reading & returning the new value.
3. Colocating with a ResourceVariable's ".op" property eliminates the creation of additional read ops.
4. Savers can read a variable's value using the _graph_element property, since these reads don't need control dependencies.

This makes the visualization of graphs on TensorBoard much nicer.

PiperOrigin-RevId: 187622122
parent 2d3e2524
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment