
Answer-first summary for fast verification
Answer: Embed the augmentation functions dynamically in the tf.Data pipeline.
Option A is the correct answer because embedding the augmentation functions dynamically in the tf.data pipeline allows for on-the-fly data augmentation during training. This method saves substantial storage space and compute resources by avoiding the need to pre-generate and store augmented images. The tf.data pipeline is highly optimized for efficient data loading and processing, ensuring that data preprocessing does not become a bottleneck during model training. It also increases the diversity of the training data by applying augmentations randomly to each batch, helping the model generalize better to unseen data.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
You are part of an AI team at an automobile company working on developing a visual defect detection model. This model is being built using TensorFlow and Keras. To enhance the performance of your model, you aim to include several image augmentation techniques, such as translation, cropping, and contrast adjustments. These functions should be applied randomly to each batch of training data. Your goal is to optimize the data processing pipeline for both runtime efficiency and optimal utilization of compute resources. What approach would you take?
A
Embed the augmentation functions dynamically in the tf.Data pipeline.
B
Embed the augmentation functions dynamically as part of Keras generators.
C
Use Dataflow to create all possible augmentations, and store them as TFRecords.
D
Use Dataflow to create the augmentations dynamically per training run, and stage them as TFRecords.