mrdbourke / tensorflow-deep-learning

All course materials for the Zero to Mastery Deep Learning with TensorFlow course.
https://dbourke.link/ZTMTFcourse
MIT License
5.14k stars 2.53k forks source link

Notebook 03: `tf.keras.preprocessing.image.ImageDataGenerator` is deprecated #467

Open mrdbourke opened 1 year ago

mrdbourke commented 1 year ago

From Pierre in the Discord:

Hey Daniel in the TF Developer Certificate course you cover the ImageDataGenerator quite a bit, also for augmenting data. On udemy a few people already pointed out that this is depreciated. It still works as of now but the tf documentary points towards using preprocessing layers instead or tf.keras.utils.image_dataset_from_directory . Maybe it would be good to point that out on a little note before the videos, to avoid confusion. Also the process is a little different. Otherwise great course as usual https://www.tensorflow.org/api_docs/python/tf/keras/preprocessing/image/ImageDataGenerator

mrdbourke commented 1 year ago

See more of the issue from GregX999:

Looks like the first time the "deprecated methodology" is introduced is in the "Building an End to End CNN Model" (here: https://academy.zerotomastery.io/courses/1240775/lectures/30615045), but it is used/repeated/referenced multiple times throughout the entire section on CNNs - in many of the videos. The new way to do it would, IMHO, required more than a note however... probably at least another video inserted into the existing ones that went over the new way (I think it's complicated enough for it's own video).

May have to recreate/add a video to showcase different usage (without using tf.keras.preprocessing.image.ImageDataGenerator.

mrdbourke commented 1 year ago

And more again from Pierre:

Of course i can provide you with the number of the video 😉 ...It is the 7th video in Section 5: Computer Vision and CNN with the video number 110. https://www.udemy.com/course/tensorflow-developer-certificate-machine-learning-zero-to-mastery/learn/lecture/25082562#overview you import the ImageDataGenerator the first time at 2:26

mrdbourke commented 1 year ago

From Ashik:

It seems like ImageDataGenerator has been depreciated https://www.tensorflow.org/api_docs/python/tf/keras/preprocessing/image/ImageDataGenerator Leave a note before lecture 116 explaining this Stick with tf.data.Dataset for preprocessing