💡TensorFlow Tip, use .cache

rishitdagli

Rishit Dagli

Posted on January 1, 2021

💡TensorFlow Tip, use .cache

💡#TensorFlowTip

Use .cache to save on some ops like opening file and reading data during each epoch

  • transformations before cache are only run for 1st epoch
  • can cache in-memory or on-disk
  • not repeatedly perform expensive CPU ops

See the speedup with .cache in this image.

Alt Text

Try it out for yourself:

💖 💪 🙅 🚩
rishitdagli
Rishit Dagli

Posted on January 1, 2021

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

💡TensorFlow Tip, use .cache
tensorflowtip 💡TensorFlow Tip, use .cache

January 1, 2021