[tf.data] Add documentation for checkpointing V2 dataset iterators.
PiperOrigin-RevId: 305898485 Change-Id: Idbee38df6b2216ac53f212a2f3fe66cb21389ebe
This commit is contained in:
parent
fbfb7e412c
commit
cf5d6e2d24
tensorflow/python
@ -25,6 +25,7 @@ from tensorflow.python.training import basic_session_run_hooks
|
||||
from tensorflow.python.training import checkpoint_management
|
||||
from tensorflow.python.training import saver as saver_lib
|
||||
from tensorflow.python.training import session_run_hook
|
||||
from tensorflow.python.util import deprecation
|
||||
from tensorflow.python.util.tf_export import tf_export
|
||||
|
||||
|
||||
@ -42,6 +43,9 @@ def _convert_external_state_policy_to_enum(external_state_policy):
|
||||
|
||||
|
||||
@tf_export("data.experimental.make_saveable_from_iterator")
|
||||
@deprecation.deprecated(
|
||||
None, "`make_saveable_from_iterator` is intended for use in TF1 with "
|
||||
"`tf.compat.v1.Saver`. In TF2, use `tf.train.Checkpoint` instead.")
|
||||
def make_saveable_from_iterator(iterator, external_state_policy="fail"):
|
||||
"""Returns a SaveableObject for saving/restoring iterator state using Saver.
|
||||
|
||||
|
@ -1723,9 +1723,9 @@ class Checkpoint(tracking.AutoTrackable):
|
||||
|
||||
`Checkpoint`'s constructor accepts keyword arguments whose values are types
|
||||
that contain trackable state, such as `tf.keras.optimizers.Optimizer`
|
||||
implementations, `tf.Variable`, `tf.keras.Layer` implementations, or
|
||||
`tf.keras.Model` implementations. It saves these values with a checkpoint, and
|
||||
maintains a `save_counter` for numbering checkpoints.
|
||||
implementations, `tf.Variable`s, `tf.data.Dataset` iterators, `tf.keras.Layer`
|
||||
implementations, or `tf.keras.Model` implementations. It saves these values
|
||||
with a checkpoint, and maintains a `save_counter` for numbering checkpoints.
|
||||
|
||||
Example usage:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user