Commit 21d94be8 authored by Allen Lavoie's avatar Allen Lavoie Committed by TensorFlower Gardener
Browse files

Simulate eager variable resoration in tf.keras.Model.load_weights when graph building

Previously, the first Model build after load_weights (e.g. a predict()) would trigger restore ops, and any variables added later (e.g. slot variables from an added optimizer) would not be restored when graph building. This change makes behavior consistent between eager execution and graph building by running new restore ops as they come in.

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