@ejguan Sir , I have made the change by putting num_workers=0 also, that made no difference here. Sir Now I think this whole code is executable, Plz check once.
This is the complete traceback
  File "E:\Python_On_All_Dataset\IEMO\long_codes\Kosta.jo\stacked _cnn.py", line 471, in <module>
    for X, y in DLS[phase]:

  File "C:\Users\krishna\Anaconda3\lib\site-packages\torch\utils\data\dataloader.py", line 517, in __next__
    data = self._next_data()

  File "C:\Users\krishna\Anaconda3\lib\site-packages\torch\utils\data\dataloader.py", line 557, in _next_data
    data = self._dataset_fetcher.fetch(index)  # may raise StopIteration

  File "C:\Users\krishna\Anaconda3\lib\site-packages\torch\utils\data\_utils\fetch.py", line 44, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]

  File "C:\Users\krishna\Anaconda3\lib\site-packages\torch\utils\data\_utils\fetch.py", line 44, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]

  File "E:\Python_On_All_Dataset\IEMO\long_codes\Kosta.jo\Dataset.py", line 26, in __getitem__
    rec= torch.FloatTensor(this.X[idx]), torch.LongTensor(this.y[idx])

IndexError: slice() cannot be applied to a 0-dim tensor.