This week you'll learn about the Introduction to TFRecords.

Image

Training a model but burning up all your cloud credits 😭?

Keeping Track of Time and Money With ActiveCollab · ActiveCollab

Training a model takes time. But what if there was a way to load and train huge amounts of data in very less time? Fortunately, we have got you covered ðŸ¤—. Today we learn about TFRecords, a custom TensorFlow format for storing and retrieving data efficiently.

The big picture: TFRecord is a custom TensorFlow format for storing a sequence of binary records. TFRecords are highly optimized for TensorFlow, which lead to them having the following advantages:

  • Efficient form of data storage
  • Faster read speed compared to other types of formats

How it works: TFRecords are extremely beneficial when training deep neural networks with TPUs. The two main advantages of the TFRecord format are that it helps us store datasets efficiently and gets faster I/O speed than reading raw data from disk. 

Our thoughts: Training huge models on large datasets is a must-have skill for a Machine Learning Engineer. But any skill needs to be honed and iterated upon. We used TFRecords to load and store datasets for our SRGAN and ESRGAN projects, and it has sped up training by 2.5X.

Yes, but: That's a very specific use case. We agree you would not need TFRecords for every other Machine Learning Project, but if you have followed the field, you would know most algorithms are moving toward larger and larger datasets.

Stay smart: Go through the tutorial and learn how to use and employ TFRecords to save time and build an efficient pipeline.

Click here to read the full tutorial

Solve Your CV/DL problem this week (or weekend) with our Working Code

You can instantly access all of the code for Introduction to TFRecords by joining PyImageSearch University. Get working code to

  1. Finish your project this weekend with our code
  2. Solve your thorniest coding problems at work this week to show off your expertise
  3. Publish groundbreaking research without multiple tries at coding the hard parts

Guaranteed Results: If you haven't accomplished your CV/DL goals, let us know within 30 days and get a full refund.

I want the code

Note: You may have missed this, but last Wednesday, we published a new post, An Interview with Peter Ip, Chief Data Scientist.



The PyImageSearch Team