tf.experimental.dtensor.name_based_save
Saves name based Tensor into a Checkpoint.
tf.experimental.dtensor.name_based_save(
mesh: tf.experimental.dtensor.Mesh
,
checkpoint_prefix: Union[str, tf.Tensor
],
name_tensor_dict: Dict[str, Union[ops.Tensor, tf_variables.Variable]]
)
The function prepares the input dictionary to the format of a sharded_save
,
so that it can take advantage of DTensor SPMD based distributed save.
Same as restore, the function only supports saving on the single mesh.
Args |
mesh
|
The single mesh that all Tensors would be restored to.
|
checkpoint_prefix
|
The prefix of checkpoint to be restored.
|
name_tensor_dict
|
A ordered dictionary of tensor_names to a DTensor. The
DTensor shape/dtype must match the tensors being saved/restored for now.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[],[]]