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

A start on a prototype for object-based variable saving.

Doesn't do anything useful yet, but has an API for Checkpointable:
  - add_variable (compatible with Layer)
  - track_checkpointable (kinda like tfe.Network's track_layer)
  - a property indicating checkpoint dependencies and their names

Also has some logic for collecting variables (using a private attribute).

Main TODOs:
 - Prototype checkpointing a full object DAG (to eventually be added to BundleHeaderProto?). This is needed in case one path to an object with multiple paths is broken, and it happens to be the path we used in the checkpoint keys for that object's variables.
 - Logic to attribute human-readable checkpoint names to objects in this full checkpointed DAG, and from the checkpointed DAG to the Python DAG being loaded into. Need some escaping when writing checkpoint names for this to work.
 - Deferred loading (copy from tfe.Network?), including some management of the creation of slot variables
 - APIs for saving/loading, some end-to-end examples

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