I suggest to profile the two pipelines performances with:

  
      

      TensorFlow
  

  
    

TensorFlow Profiler: Profile model performance  |  TensorBoard 1



  

  
    
    
  

  



  
      

      TensorFlow
  

  
    

Analyze tf.data performance with the TF Profiler  |  TensorFlow Core 1



  

  
    
    
  

  


I’ve not checked your specific model but generally if your preprocessing pipeline is faster then the inference+backward steps of your model with enough margin you could prepare your data on CPU in parallel when the GPU is “computing” your model.