Thanks ,That solved it
But now i get ,
    IndexError                                Traceback (most recent call last)
<ipython-input-288-6c9fa04cc535> in <module>()
     15 img_list = []
     16 for i in range(4):
---> 17     img, label = train_dataset[i]
     18     img_list.append(img)
     19     img_list.append(label)

<ipython-input-287-6a4c2792d56a> in __getitem__(self, index)
     25 
     26     def __getitem__(self,index):
---> 27         img = Image.open(self.data_path[index])
     28         target = Image.open(self.label_path[index]) if not self.subset == 'test' else None
     29 

IndexError: list index out of range

any tips?