Type FixedLengthRecordDataset
Namespace tensorflow.data
Parent DatasetV1Adapter
Interfaces IFixedLengthRecordDataset
A `Dataset` of fixed-length records from one or more binary files.
Methods
Properties
Public instance methods
object cache(string filename)
object cache_dyn(ImplicitContainer<T> filename)
Caches the elements in this dataset.
Parameters
-
ImplicitContainer<T>
filename - A
tf.string
scalartf.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
-
object
object shuffle_dyn(object buffer_size, object seed, object reshuffle_each_iteration)
Randomly shuffles the elements of this dataset. This dataset fills a buffer with `buffer_size` elements, then randomly
samples elements from this buffer, replacing the selected elements with new
elements. For perfect shuffling, a buffer size greater than or equal to the
full size of the dataset is required. For instance, if your dataset contains 10,000 elements but `buffer_size` is
set to 1,000, then `shuffle` will initially select a random element from
only the first 1,000 elements in the buffer. Once an element is selected,
its space in the buffer is replaced by the next (i.e. 1,001-st) element,
maintaining the 1,000 element buffer.
Parameters
-
object
buffer_size - A
tf.int64
scalartf.Tensor
, representing the number of elements from this dataset from which the new dataset will sample. -
object
seed - (Optional.) A
tf.int64
scalartf.Tensor
, representing the random seed that will be used to create the distribution. See `tf.compat.v1.set_random_seed` for behavior. -
object
reshuffle_each_iteration - (Optional.) A boolean, which if true indicates that the dataset should be pseudorandomly reshuffled each time it is iterated over. (Defaults to `True`.)
Returns
-
object
object take(IEnumerable<int> count)
Creates a `Dataset` with at most `count` elements from this dataset.
Parameters
Returns
-
object