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
Loading
Please sign in to comment