Open utterances-bot opened 4 years ago
Awesome and very useful 🎊
Glad you liked it.
Great article Sayak ! By the way, have you tried using the new data augmentation layers in your tf.data.Dataset pipeline ?
Thank you so much, Martin!
Were you referring to these layers: https://www.tensorflow.org/api_docs/python/tf/keras/layers/experimental/preprocessing?
If so, then yes, I used it here.
Hi Sayak, good write up.
Why would you have data augmentation as part of the network itself? Doesn't it make it tedious to skip augmentation at test time?
There are some existing works that utilize augmentations like center crops, flips, etc. during test time. That is why.
Hello Sayak, It was a good reading
But I have some question regarding th usage of tf.data API. When I use that approach, the data augmentation is applied only once, right? It is not applied during training time per each epoch. If that is true, how can I do it during training to apply variety to my dataset each time it changes epoch?
I really appreciate your work and thank you for you attention.
It's applied during each epoch actually. You can verify that by adding random augmentation transformations like random size cropping and plotting the augmented images after a fixed number of steps. This would roughly replicate how images will be fed to your network during training.
Different data augmentation recipes in tf.keras for image classification | Sayak Paul
Learn about different ways of doing data augmentation when training an image classifier in tf.keras.
https://sayak.dev/tf.keras/data_augmentation/image/2020/05/10/augmemtation-recipes.html