问题
If I use
dataset.batch(n).prefetch(m),
m batches or m samples will be prefetched?
回答1:
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.
来源:https://stackoverflow.com/questions/49707062/tensorflow-dataset-api-dataset-batchn-prefetchm-prefetches-m-batches-or-sam