Week 2 Quiz :Convolutional Neural Networks in TensorFlow (DeepLearning.AI TensorFlow Developer Professional Certificate) Answers 2025
1. Question 1
When using image augmentation with image_dataset_from_directory, what happens to your raw image data on-disk?
-
❌ It gets overwritten, so be sure to make a backup
-
❌ A copy is made and the augmentation is done on the copy
-
✅ Nothing, all augmentation is done in-memory
-
❌ It gets deleted
Explanation: Augmentation only happens in RAM, no file on disk is modified.
2. Question 2
How does image augmentation help solve overfitting?
-
❌ It slows down the training process
-
✅ It manipulates the training set to generate more scenarios for features in the images
-
❌ It manipulates the validation set
-
❌ It automatically fits features with image processing
Explanation: Augmentation creates varied versions of the training data, helping the model generalize.
3. Question 3
Using image augmentation simulates having a larger variation of images.
-
❌ False
-
✅ True
Explanation: Augmentation produces transformed versions (rotations, flips, zooms), mimicking a larger and more diverse dataset.
4. Question 4
When using image augmentation, model training gets…
-
❌ slower
-
❌ faster
-
❌ stays the same
-
❌ much faster
Correct Answer:
✅ slower
Explanation: Augmentation adds extra preprocessing, so each batch takes slightly more time.
5. Question 5
Training data has people facing left; you want to classify right-facing people. What should you use?
-
❌ Use the ‘flip’ parameter of image_dataset_from_directory
-
❌ Use RandomFlip vertical
-
✅ Use RandomFlip layer and set
mode='horizontal' -
❌ Use flip parameter & set horizontal
Explanation: A horizontal flip effectively creates right-facing versions of left-facing people.
6. Question 6
How do you use image augmentation in TensorFlow?
-
❌ Write a plugin
-
✅ Using preprocessing layers from the Keras Layers API
-
❌ tf.augment API
-
❌ keras.augment API
Explanation: Modern TensorFlow uses Keras preprocessing layers like RandomFlip, RandomRotation.
7. Question 7
Why does training become slower after adding augmentation?
-
❌ Training makes more mistakes
-
❌ More data to train on
-
✅ Image preprocessing takes cycles
-
❌ Augmented data is bigger
Explanation: Augmentation operations (flip, rotate, zoom) require extra compute time per step.
8. Question 8
What does the fill_mode parameter do?
-
❌ There is no fill_mode
-
❌ Creates random noise
-
✅ Recreates lost information after transformations
-
❌ Masks background
Explanation: fill_mode decides how blank pixels created by rotation/zoom/shear should be filled.
🧾 Summary Table
| Q# | Correct Answer | Key Concept |
|---|---|---|
| 1 | Nothing, all augmentation in-memory | Augmentation does not touch disk files |
| 2 | Augments training data to create scenarios | Helps prevent overfitting |
| 3 | True | Augmentation simulates dataset expansion |
| 4 | Slower | Extra computation needed |
| 5 | RandomFlip horizontal | Creates mirrored right-facing images |
| 6 | Keras preprocessing layers | TF official augmentation method |
| 7 | Preprocessing takes cycles | Slower training |
| 8 | Recreates missing pixels | fill_mode behavior |