Commit 955b506d authored by Suharsh Sivakumar's avatar Suharsh Sivakumar Committed by TensorFlower Gardener
Browse files

variables_to_restore: Differentiate python variables by string name rather than object.

variables_to_restore ensured that duplicate variables weren't added to the return map by comparing python variable object. Normally there is only one Variable object for each underlying variable, so this wasn't a problem. But when one initializes a graph by importing a GraphDef, duplicate python Variable objects are created for each occurrence of a variable in a collection (say, global variables and moving average variables).

This change fixes variables_to_restore to work with an imported graph def by not comparing Variable objects.

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