MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / write

Method write

tensorflow/python/training/tracking/util.py:1800–1828  ·  view source on GitHub ↗

Writes a training checkpoint. The checkpoint includes variables created by this object and any trackable objects it depends on at the time `Checkpoint.write()` is called. `write` does not number checkpoints, increment `save_counter`, or update the metadata used by `tf.train.lat

(self, file_prefix)

Source from the content-addressed store, hash-verified

1798 trainable=False))
1799
1800 def write(self, file_prefix):
1801 """Writes a training checkpoint.
1802
1803 The checkpoint includes variables created by this object and any
1804 trackable objects it depends on at the time `Checkpoint.write()` is
1805 called.
1806
1807 `write` does not number checkpoints, increment `save_counter`, or update the
1808 metadata used by `tf.train.latest_checkpoint`. It is primarily intended for
1809 use by higher level checkpoint management utilities. `save` provides a very
1810 basic implementation of these features.
1811
1812 Args:
1813 file_prefix: A prefix to use for the checkpoint filenames
1814 (/path/to/directory/and_a_prefix).
1815
1816 Returns:
1817 The full path to the checkpoint (i.e. `file_prefix`).
1818 """
1819 output = self._saver.save(file_prefix=file_prefix)
1820 if tensor_util.is_tensor(output):
1821 if context.executing_eagerly():
1822 return compat.as_str(output.numpy())
1823 else:
1824 # Function building
1825 return output
1826 else:
1827 # Graph + Session, so we already session.ran it.
1828 return compat.as_str(output)
1829
1830 @property
1831 def save_counter(self):

Callers 15

testCustomNumberingMethod · 0.95
_save_checkpointFunction · 0.95
saveMethod · 0.95
_write_cacheMethod · 0.45
write_report_protoMethod · 0.45
_write_reportMethod · 0.45
testTextLineDatasetMethod · 0.45
strip_unused_from_filesFunction · 0.45
WriteGraphFilesMethod · 0.45
mainFunction · 0.45

Calls 4

is_tensorMethod · 0.80
executing_eagerlyMethod · 0.80
saveMethod · 0.45
numpyMethod · 0.45

Tested by 13

testCustomNumberingMethod · 0.76
_save_checkpointFunction · 0.76
testTextLineDatasetMethod · 0.36
WriteGraphFilesMethod · 0.36
testMethod · 0.36
setUpMethod · 0.36
_write_vocabMethod · 0.36
_csv_dataMethod · 0.36