When shuffle is
DataLoader class what is the default Sampler then?
From the docs:
shuffle (bool, optional): set to ``True`` to have the data reshuffled
at every epoch (default: ``False``).
If I don’t set the Sampler one must be used by default. Can you give any clue?
If no sampler was specified and
RandomSampler will be used as shown in this line of code.
Thanks, from there I also saw one interesting line
if batch_sampler is None:
So if we set the
bs is instance of the class
BatchSampler we are OK?
So I guess if we do have
batch_size greater than 1 for our
DataLoader it is more common to use the
Yes, if no
batch_sampler was provided, the
sampler (either default or passed) will be wrapped in a
@ptrblck if i dont give sampler and shuffle is also false.
How are items retrieved by dataloader.
Using the SequentialSampler as shown in this line, a couple lines below the above. You can find more information about it at https://pytorch.org/docs/stable/data.html#torch.utils.data.SequentialSampler
Thanks I use that but dont know why i get an error