In this post, you will learn
How does a naive approach work for input data pipeline and model training?
When creating an input data pipeline, typically, we perform the ETL(Extract, Transform, and Load) process.
The pre-processing of the data occurs on the CPU, and the model will be typically trained on GPU/TPU.
In a naive model training approach, CPU pre-processes the data to get it ready for the model to train, while the GPU/TPU is idle. When GPU/TPU starts training the model, the CPU is idle. This is not an efficient way to manage resources as shown below.
Naive data pre-processing and training approach
What are the options to expedite the training process?
To expedite the training, we need to optimize the data extraction, data transformation, and data loading process, all of which happens on the CPU.
Data Extraction: Optimize the data read from data sources
Data Transformation: Parallelize the data augmentation
Data Loading: Prefetch the data one step ahead of training
These techniques will efficiently utilize the CPU and GPU/TPU resources for data pre-processing and training.
How can we achieve the input pipeline optimization?
#image-classification #model-optimization #tensorflow #machine-learning #deep-learning