Tensorflow Input Pipeline | tf Dataset | Deep Learning Tutorial 44 (Tensorflow, Keras & Python)

Tensorflow Input Pipeline | tf Dataset | Deep Learning Tutorial 44 (Tensorflow, Keras & Python)

codebasics

3 года назад

97,659 Просмотров

Tensorflow tf.Data api allows you to build a data input pipeline. Using this you can handle large dataset for your deep learning training by streaming training samples from hard disk or S3 storage. tf.data.Dataset is the main class in tf.data api. In this video we see how tf pipeline allows not only to stream the data for training but you can peform various transformations easily by writing a single line of code.

Code: https://github.com/codebasics/deep-learning-keras-tf-tutorial/blob/master/44_tf_data_pipeline/tf_data_pipeline.ipynb
Exercise: https://github.com/codebasics/deep-learning-keras-tf-tutorial/blob/master/44_tf_data_pipeline/Exercise/tf_data_pipeline_exercise.md
Stackoverflow article: https://stackoverflow.com/questions/53514495/what-does-batch-repeat-and-shuffle-do-with-tensorflow-dataset

⭐️ Timestamps ⭐️
00:00 Introduction
00:21 Theory
07:58 Coding
31:34 Exercise

Do you want to learn technology from me? Check https://codebasics.io/ for my affordable video courses.

Deep learning playlist: https://www.youtube.com/playlist?list=PLeo1K3hjS3uu7CxAacxVndI4bE_o3BDtO
Machine learning playlist : https://www.youtube.com/playlist?list=PLeo1K3hjS3uvCeTYTeyfe0-rN5r8zn9rw  

🔖Hashtags🔖

#tfdatapipeline #tfdatashuffle #tfdataapi #tfdataexample #tfdatadatasettutorial #tensorflowinputpipeline #deeplearningtutorial #tensorflowtutorial

🌎 Website: https://codebasics.io/

🎥 Codebasics Hindi channel: https://www.youtube.com/channel/UCTmFBhuhMibVoSfYom1uXEg

#️⃣ Social Media #️⃣
🔗 Discord: https://discord.gg/r42Kbuk
📸 Instagram: https://www.instagram.com/codebasicshub/
🔊 Facebook: https://www.facebook.com/codebasicshub
📱 Twitter: https://twitter.com/codebasicshub
📝 Linkedin (Personal): https://www.linkedin.com/in/dhavalsays/
📝 Linkedin (Codebasics): https://www.linkedin.com/company/codebasics/

❗❗ DISCLAIMER: All opinions expressed in this video are of my own and not that of my employers'.

Тэги:

#tf_data_pipeline #tf_data_shuffle #tf_data_api #tf.data.dataset_tutorial #tensorflow_input_pipeline #tf_input_pipeline #tensorflow_data_shuffle #tensorflow_data_api #input_pipeline_tensorflow #input_pipeline #tensorflow_pipeline #tensorflow_pipeline_example #tensorflow_dataset #tensorflow_input_pipeline_tutorial #tensorflow_data_pipeline #tensorflow_input_pipeline_performance #Input_data_pipeline #tf.data_pipeline #tensorflow_datasets #loading_data_tensorflow
Ссылки и html тэги не поддерживаются


Комментарии:

Frankie Iero
Frankie Iero - 12.10.2023 13:01

does this input pipeline also applicable for hyperspectral images?

Ответить
Shanti B
Shanti B - 20.09.2023 11:54

tf_dataset = tf_dataset.filter(lambda x: x>0)
for sales in tf_dataset.np():
print(sales)

AttributeError Traceback (most recent call last)
<ipython-input-7-6d7e945f4009> in <module>
1 tf_dataset = tf_dataset.filter(lambda x: x>0)
----> 2 for sales in tf_dataset.np():
3 print(sales)

AttributeError: 'FilterDataset' object has no attribute 'np'

Ответить
Ahmed Yaseen
Ahmed Yaseen - 29.08.2023 07:58

i love you man. Been struggling with tf for 2 months as I only have experience with pandas. The theory part was so helpful in understanding why tf is the way it is. And obv the coding part too. Thank you so much!

Ответить
JAYSOFT SYSTEMS
JAYSOFT SYSTEMS - 21.06.2023 17:21

i wish to learn on both deep learning and python through you.

Ответить
Kevin Ian Ruiz Vargas
Kevin Ian Ruiz Vargas - 26.05.2023 19:29

Excellent tutorial! Thank you

Ответить
Haneul Kim
Haneul Kim - 06.05.2023 13:49

Thanks for great explanation! I've got two questions.
1. You said that it loads data in batches from disk how does shuffling work? Data are sampled from multiple source data then made into one batch or somehow all data is shuffled from disk?

2. I am trying to write tfrecords from pandas dataframe, how to split x,y within tf.data.dataset so it can be trained? After reading tfrecords I have dictionary of features(tensors).

Ответить
Srinath Blaze
Srinath Blaze - 03.03.2023 13:57

What if folders are not clearly separated as cats and dogs.. and we have just one folder of all images of cats and dogs.

Ответить
Dheemanth Bhat
Dheemanth Bhat - 17.02.2023 16:53

if anyone gets this error: `InvalidArgumentError: Unknown image file format. One of JPEG, PNG, GIF, BMP required.`
just delete file `Best Dog & Puppy Health Insurance Plans....jpg` in dogs folder.

Ответить
Niranjan Sitapure
Niranjan Sitapure - 09.02.2023 18:34

This was crazy useful!

Ответить
Pravallika Ece
Pravallika Ece - 08.01.2023 20:11

You are helping the data science community in an excellent way. keep going on and all the power to you. Thanks! and a very small token of appreciation

Ответить
Harshal Bhoir
Harshal Bhoir - 04.01.2023 02:13

This is awesome!!!!

Ответить
pvt gcn
pvt gcn - 25.12.2022 18:24

Great Explanation

Ответить
Eric Newhuis
Eric Newhuis - 17.12.2022 22:50

Enjayable presentation. But I have 64GB on MY laptop. :P

Ответить
庞经纬
庞经纬 - 18.10.2022 17:03

If I get some image matrix data and save it as a dataframe, how do I pass it into the dataset as a feature? The from_tensor_slices method will report "ValueError: Failed to convert a NumPy array to a Tensor (Unsupported object type numpy.ndarray)." Thanks everyone for your help!

Ответить
Peter Pirog
Peter Pirog - 16.10.2022 00:22

Very nice tutorial. I wonder how to generate dataset with random numbers, for example vector with uniform distribution in range <0,1> with defined size to use while fiting with defined number of epochs and defined batch size. Is possible to use for this purpose tf.data.experimental.RandomDataset in tf 2.10 ?

Ответить
Fernando Torales - Acosta
Fernando Torales - Acosta - 13.09.2022 04:49

Man, this really helped me out. I was overcomplicating things. Thanks a bunch!

Ответить
Niranjan Dattatreya
Niranjan Dattatreya - 05.08.2022 15:10

Hii, thanks a lot for the video , very useful, can you please upload tutorial on creating a custom dataset from parallel corpus of data for training ? unable to figure out

Ответить