6 Dataset and DataLoader in PyTorch.

preview_player
Показать описание
In this video, we will be learning what the Dataset class and DataLoader are in PyTorch.

For the Dataset class, we will see the three functions that we have to define which are the init, len and the getitem function. We will be learning what are the roles of these three functions and also see the practical implementation of the concept in PyTorch in colab.

For the DataLoader function, we will study the different parameters and also see the a practical implementation in PyTorch in colab. We will learn what the batch_size parameter means and others like the shuffle parameter, num_workers and the pin_memory parameters.

Connect to me on Instagram for questions:

Connect on Facebook:

For a 1-1 video chat on your projects or some topic in computer science, take my Fiverr gig:
Рекомендации по теме
Комментарии
Автор

Wow, this is a great tutorial on PyTorch's Dataset class and DataLoader! I appreciate the detailed explanation of the functions and parameters. Your practical implementation in Colab will definitely help a lot of learners. Keep up the good work!

rachadlakis
Автор

Thank you, this is a really well explained video!

NehalPatel
Автор

I'm getting an error with the __getitem__ method. Train is a numpy array (<class 'numpy.ndarray'>) and iloc if a method of a pandas DF..

dp =
AttributeError: 'numpy.ndarray' object has no attribute 'iloc'

WHy does your code work and mine doesn't? How is your (train, target) objects of type pandas dataframe? As I understand it, your code works because train & target are pandas dataframes. When / how did your train / targets become dataframes while mine remains numpy ndarrays? (I'm learning much from your videos...)

lakeguy