December 2018
Intermediate to advanced
764 pages
18h 18m
English
By default, the Saver() class saves all the variables in a graph, but you can select which variables to save by passing the list of variables to the constructor of the Saver() class:
# create saver objectsaver = tf.train.Saver({'weights': w})
The variables names can be passed either as a list or as a dictionary. In case the variable names are passed as a list then each variable in the list will be saved with its own name. The variables can also be passed as a dictionary consisting of key-value pairs where the key is the name to be used for saving and the value is the name of the variable to be saved.
The following is the code for the example we just saw, but this time we are only ...
Read now
Unlock full access