Saving graph variables without saving structure

22 views
Skip to first unread message

Daniel McKenna

unread,
Apr 27, 2020, 12:39:39 PM4/27/20
to Rust for TensorFlow
I'm just wondering if it's possible to save/load the graph variables without saving any information about the graph structure? I have the graph structure saved in another location and have a requirement of reducing storage volume taken up as well as limiting knowledge of the internals of the graph to certain users.

Adam Crume

unread,
Apr 30, 2020, 11:48:48 AM4/30/20
to Daniel McKenna, Rust for TensorFlow
The variables are saved by running a SaveV2 op under the hood.  You should be able to save variables by running that, and restore them by running a RestoreV2 op.  There isn't a built-in way to do that in the Rust bindings at the moment, but it can be done manually.  There's an old issue for this which should probably be revisited (https://github.com/tensorflow/rust/issues/30) and an example (https://github.com/tensorflow/rust/blob/master/examples/regression_checkpoint.rs).

On Mon, Apr 27, 2020 at 9:39 AM Daniel McKenna <danielm...@gmail.com> wrote:
I'm just wondering if it's possible to save/load the graph variables without saving any information about the graph structure? I have the graph structure saved in another location and have a requirement of reducing storage volume taken up as well as limiting knowledge of the internals of the graph to certain users.

--
You received this message because you are subscribed to the Google Groups "Rust for TensorFlow" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rust+uns...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/rust/949d8d23-0856-4360-8f3e-9086a7bd6821%40tensorflow.org.
Reply all
Reply to author
Forward
0 new messages