0
0
TensorFlowml~12 mins

Data augmentation in pipeline in TensorFlow - Model Pipeline Trace

Choose your learning style9 modes available
Model Pipeline - Data augmentation in pipeline

This pipeline shows how data augmentation helps a model learn better by creating new, varied images from the original ones during training. It makes the model stronger by showing it many different versions of the same image.

Data Flow - 4 Stages
1Original dataset
1000 rows x 32x32x3 imagesLoad raw images and labels1000 rows x 32x32x3 images
Image of a cat with label 'cat'
2Data augmentation
1000 rows x 32x32x3 imagesApply random flips, rotations, and brightness changes1000 rows x 32x32x3 images (augmented)
Flipped cat image, rotated cat image, brighter cat image
3Batching and shuffling
1000 rows x 32x32x3 imagesShuffle data and group into batches of 3232 rows x 32x32x3 images per batch
Batch of 32 augmented images with labels
4Model input
32 rows x 32x32x3 imagesFeed batch into CNN model32 rows x 10 class probabilities
Batch predictions for 10 classes
Training Trace - Epoch by Epoch

Loss
1.2 |*       
1.0 | *      
0.8 |  *     
0.6 |   *    
0.4 |    *   
    +---------
     1 2 3 4 5
       Epochs
EpochLoss ↓Accuracy ↑Observation
11.20.55Model starts learning with augmented data
20.90.68Loss decreases, accuracy improves
30.70.75Model learns better features from augmented images
40.550.82Training stabilizes with good accuracy
50.450.87Model converges with augmented data
Prediction Trace - 4 Layers
Layer 1: Input image
Layer 2: Data augmentation
Layer 3: CNN layers
Layer 4: Dense layer with softmax
Model Quiz - 3 Questions
Test your understanding
Why do we apply data augmentation in the training pipeline?
ATo create more varied training images and improve model learning
BTo reduce the size of the dataset
CTo make the images black and white
DTo speed up the training by skipping images
Key Insight
Data augmentation helps the model see many versions of the same image, which improves its ability to generalize and recognize objects better. This leads to lower loss and higher accuracy during training.