How to speed up batch preparation when using Estimators API combined with tf.data.Dataset
问题 I'd like to speed up my training routine that uses the Estimator API with input_fn wrote using tf.data.Dataset . My implementation takes 2 second to prepare a batch of data and then runs training on GPU for 1 sec, and then start over preparing a batch. Which is really inefficient. I'm looking for a way to prepare the batches asynchronously and upload them to GPU to speed up the training. Or alternatively for a way to cache datasets between invocations of input_fn (the dataset.cache() doesn't