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="")
| 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. |