In TensorFlow's Dataset API, we can use dataset.prefetch(buffer_size=xxx)
to preload other batches' data while GPU is processing the current batch's data, therefore, I can make full use of GPU.
I'm going to use Keras, and wonder if keras
has a similar API for me to make full use of GPU, instead of serial execution: read batch 0->process batch 0->read batch 1-> process batch 1-> ...
I briefly looked through the keras
API and did not see a description of the prefetch.