Experiment - Prefetching for performance
Problem:You have a TensorFlow model training on image data using tf.data.Dataset. The training is slow because the data loading and preprocessing block the GPU from running efficiently.
Current Metrics:Training time per epoch: 120 seconds; Training accuracy after 5 epochs: 75%; Validation accuracy after 5 epochs: 72%
Issue:The model training is slow due to input pipeline bottleneck. The GPU waits for data because the dataset does not use prefetching.