If variables have already been created (typically when some or all of the
Network is built), they are assigned values from the checkpoint immediately,
overwriting any existing values (in graph mode the default session is used for
the assignments).
If there are checkpoint entries which do not correspond to any existing
variables in the Network, these values are saved for deferred restoration;
their initial values will be the checkpointed values once they are
created. Requests for multiple deferred restorations behave the same way as
immediate restorations, in that later requests will take priority over earlier
requests relevant to the same variable.
If this Network shares Layers with another network, those Layers will
also have their variables restored from the checkpoint.
Args
network
A Network object to restore.
save_path
The return value of tfe.save_network_checkpoint, or a directory
to search for a checkpoint.
map_func
A function mapping fully qualified variable names (e.g.
'my_network_1/dense_1/kernel') to names in the checkpoint. By default (if
map_func=None), the variable prefix for the network being restored
(Network.scope_name + '/', e.g. 'my_network_1/') is stripped and all
other variable names (shared with other Networks) are left unchanged. Note
that this is the same map_func as tfe.save_network_checkpoint, not an
inverse mapping.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2020-10-01 UTC."],[],[],null,["# tf.contrib.eager.restore_network_checkpoint\n\n\u003cbr /\u003e\n\n|--------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/eager/python/network.py#L970-L1027) |\n\nRestore the Network from a checkpoint. (deprecated) \n\n tf.contrib.eager.restore_network_checkpoint(\n network, save_path, map_func=None\n )\n\n| **Warning:** THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Please inherit from tf.keras.Model instead of tfe.Network, and use tf.keras.Model.load_weights.\n\nIf variables have already been created (typically when some or all of the\n`Network` is built), they are assigned values from the checkpoint immediately,\noverwriting any existing values (in graph mode the default session is used for\nthe assignments).\n\nIf there are checkpoint entries which do not correspond to any existing\nvariables in the `Network`, these values are saved for deferred restoration;\ntheir initial values will be the checkpointed values once they are\ncreated. Requests for multiple deferred restorations behave the same way as\nimmediate restorations, in that later requests will take priority over earlier\nrequests relevant to the same variable.\n\nIf this `Network` shares `Layer`s with another network, those `Layer`s will\nalso have their variables restored from the checkpoint.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|-------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `network` | A Network object to restore. |\n| `save_path` | The return value of `tfe.save_network_checkpoint`, or a directory to search for a checkpoint. |\n| `map_func` | A function mapping fully qualified variable names (e.g. 'my_network_1/dense_1/kernel') to names in the checkpoint. By default (if `map_func=None`), the variable prefix for the network being restored (`Network.scope_name + '/'`, e.g. 'my_network_1/') is stripped and all other variable names (shared with other Networks) are left unchanged. Note that this is the *same* map_func as `tfe.save_network_checkpoint`, not an inverse mapping. |\n\n\u003cbr /\u003e"]]