I would like to remove specific indices from dataset. I tried this but it doesn’t work 
class MyDataset(Dataset):
   def __init__(self,remove_list):
        self.cifar10 = datasets.CIFAR10(root='./data',

                                        download=False,
                                        train=True,
                                        transform=transforms.ToTensor())
        self.data = self.cifar10.data
        self.targets = self.cifar10.targets
        self.final_data, self.final_targets = self.__remove__(remove_list)
      
    def __getitem__(self, index):
        data, target = self.final_data[index], self.final_targets[index]
        return data, target, index

    def __len__(self):
        return len(self.final_data)

    def __remove__(self, remove_list):
        data = np.delete(self.data, remove_list)
        targets = np.delete(self.targets, remove_list)
        return data, targets