when I try to shuffle dataset like this,
dataloader = torch.utils.data.DataLoader(dataset, batch_size=16, shuffle=True, num_workers=6)
I have an error berrow
Traceback (most recent call last):
  File "datasets.py", line 41, in <module>
    dataloader = torch.utils.data.DataLoader(dataset, batch_size=16, shuffle=True, num_workers=6)
  File "~/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 213, in __init__
    sampler = RandomSampler(dataset)
  File "~/lib/python3.7/site-packages/torch/utils/data/sampler.py", line 92, in __init__
    if not isinstance(self.num_samples, int) or self.num_samples <= 0:
  File "~/lib/python3.7/site-packages/torch/utils/data/sampler.py", line 100, in num_samples
    return len(self.data_source)
TypeError: 'NoneType' object cannot be interpreted as an integer