Rishit Dagli
Rishit Dagli's Blog

Rishit Dagli's Blog

💡TensorFlow Tip, use prefetch

💡TensorFlow Tip, use prefetch

Rishit Dagli's photo
Rishit Dagli

Published on Dec 13, 2020

1 min read

Subscribe to my newsletter and never miss my upcoming articles

Originally posted on twitter.com

💡 #TensorFlowTip Use .prefetch to reduce your step time of training and extracting data

  • overlap the preprocessing and model execution
  • while the model executes training step n the input pipeline is reading the data for n+1 step
  • reduces the idle time for the GPU and CPU

See the speedup with .prefetch in this image.

Try it for yourself :

 
Share this