Reputation: 143
If I use
dataset.batch(n).prefetch(m),
m batches or m samples will be prefetched?
Upvotes: 9
Views: 3535
Reputation: 126154
The Dataset.prefetch(m)
transformation prefetches m
elements of its direct input. In this case, since its direct input is dataset.batch(n)
and each element of that dataset is a batch (of n
elements), it will prefetch m
batches.
Upvotes: 20