If I use
dataset.batch(n).prefetch(m),
m batches or m samples will be prefetched?
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.
m
dataset.batch(n)
n