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

Method cache

tensorflow/python/data/ops/dataset_ops.py:976–987  ·  view source on GitHub ↗

Caches the elements in this dataset. Args: filename: A `tf.string` scalar `tf.Tensor`, representing the name of a directory on the filesystem to use for caching elements in this Dataset. If a filename is not provided, the dataset will be cached in memory. Returns:

(self, filename="")

Source from the content-addressed store, hash-verified

974 return ShuffleDataset(self, buffer_size, seed, reshuffle_each_iteration)
975
976 def cache(self, filename=""):
977 """Caches the elements in this dataset.
978
979 Args:
980 filename: A `tf.string` scalar `tf.Tensor`, representing the name of a
981 directory on the filesystem to use for caching elements in this Dataset.
982 If a filename is not provided, the dataset will be cached in memory.
983
984 Returns:
985 Dataset: A `Dataset`.
986 """
987 return CacheDataset(self, filename)
988
989 def take(self, count):
990 """Creates a `Dataset` with at most `count` elements from this dataset.

Callers 15

input_fnMethod · 0.45
fnMethod · 0.45
testOptionsOnceMethod · 0.45
testOptimizationMethod · 0.45
testCacheInputsMethod · 0.45
dataset_fnMethod · 0.45
testConcurrentWritersMethod · 0.45
testConcurrentReadersMethod · 0.45
do_testMethod · 0.45

Calls 1

CacheDatasetClass · 0.70

Tested by 15

fnMethod · 0.36
testOptionsOnceMethod · 0.36
testOptimizationMethod · 0.36
testCacheInputsMethod · 0.36
dataset_fnMethod · 0.36
testConcurrentWritersMethod · 0.36
testConcurrentReadersMethod · 0.36
do_testMethod · 0.36